Skip to content

Commit eaa6e1c

Browse files
committed
Adds runtime dependency handling to CMake configuration
Includes system libraries and enables runtime dependency detection via `CMAKE_INSTALL_RPATH_USE_LINK_PATH`. Improves build and install process by optimizing runtime paths for better portability.
1 parent a858ffd commit eaa6e1c

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# min required cmake version
22
cmake_minimum_required(VERSION 3.24)
33

4+
include(InstallRequiredSystemLibraries)
5+
6+
# Enable automatic runtime dependency detection
7+
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
8+
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
9+
410
# Define the project name (ShipNetSim) and
511
# the programming language used (CXX for C++)
612
set(ShipNetSim_VERSION "0.0.3" CACHE STRING "Project version" FORCE)

0 commit comments

Comments
 (0)