diff --git a/CMakeLists.txt b/CMakeLists.txt index 3412f9103b36238d50a9f61f7b4ddf0b6c213278..9be69e24efe078590c6daba3e49eb06067fe7193 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,10 +13,13 @@ list (APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake") option(ENABLE_EXTRAE "Enable Extrae" OFF) option(ENABLE_DLB "Enable DLB" OFF) -# Install depending options +# other options options option(BUILD_C_FORTRAN "Enable C and Fortran Interfaces" ON) option(SPLIT_FORTRAN_LIBRARY "Split the fortran symbols into a special library (nesmik_f) - EXPERIMENTAL" OFF) -option(GEN_BINDINGS "Use Shroud to Generate C/Fortran interface" OFF) +option(GEN_BINDINGS "Use Shroud to Generate C/Fortran interface - EXPERIMENTAL" OFF) + +# Install options +option(INSTALL_WITH_RPATH "RPATH the build depencies for e.g dlb into the shared object, if not you have to provide symbols at loading time" OFF) # Other options option(WITH_MPI "Compile with MPI" OFF) @@ -28,6 +31,10 @@ if(BUILD_C_FORTRAN) set(CMAKE_Fortran_MODULE_DIRECTORY ${CMAKE_BINARY_DIR}/mod) endif() +if(INSTALL_WITH_RPATH) + SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) +endif() + add_library(${PROJECT_NAME} SHARED) set(NESMIK_PUBLIC_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/include)