diff --git a/cmake/build_rules.cmake b/cmake/build_rules.cmake index e5ab61a..58923ff 100644 --- a/cmake/build_rules.cmake +++ b/cmake/build_rules.cmake @@ -47,3 +47,14 @@ foreach(flag ${CXX11_FEATURE_LIST}) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D${flag} -pthread" ) endforeach() +if(APPLE) + set( CMAKE_MACOSX_RPATH ON) + set( CMAKE_BUILD_WITH_INSTALL_RPATH FALSE ) + set( CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}/strus" ) + set( CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE ) +else(APPLE) + set( CMAKE_BUILD_WITH_INSTALL_RPATH FALSE ) + set( CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}/strus" ) + set( CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE ) + set( CMAKE_NO_BUILTIN_CHRPATH TRUE ) +endif(APPLE) diff --git a/cmake/install_prefix.cmake b/cmake/install_prefix.cmake index 72377b9..6a8e051 100644 --- a/cmake/install_prefix.cmake +++ b/cmake/install_prefix.cmake @@ -15,14 +15,3 @@ else(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) set( LIB_INSTALL_DIR lib ) endif(NOT LIB_INSTALL_DIR) endif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) -if(APPLE) - set(CMAKE_MACOSX_RPATH ON) - set( CMAKE_BUILD_WITH_INSTALL_RPATH FALSE ) - set( CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}/strus" ) - set( CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE ) -else(APPLE) - set( CMAKE_BUILD_WITH_INSTALL_RPATH FALSE ) - set( CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}/strus" ) - set( CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE ) - set( CMAKE_NO_BUILTIN_CHRPATH TRUE ) -endif(APPLE)