WSL/SLF GitLab Repository

Commit 6b70a7be authored by Mathias Bavay's avatar Mathias Bavay
Browse files

Fixing the warning on new Cmake versions about RPATH on OSX

parent f5834ae8
......@@ -73,6 +73,21 @@ IF(UNIX)
SET(CMAKE_SHARED_LINKER_FLAGS "-framework CoreFoundation")
#set(CMAKE_OSX_SYSROOT iphoneos2.2.1) #for IOS
#set(CMAKE_OSX_ARCHITECTURES $(ARCHS_STANDARD_32_BIT)) #for IOS
#set a full rpath for both build & install tree
SET(CMAKE_SKIP_BUILD_RPATH FALSE)
SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
# add the automatically determined parts of the RPATH
# which point to directories outside the build tree to the install RPATH
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
# the RPATH to be used when installing, but only if it's not a system directory
LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir)
IF("${isSystemDir}" STREQUAL "-1")
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
ENDIF("${isSystemDir}" STREQUAL "-1")
ELSE(APPLE)
SET(DLL_EXT "so*")
SET(STAT_EXT "a")
......
......@@ -73,8 +73,9 @@ ENDIF(GUI_EXCEPTIONS)
IF(BUILD_SHARED_LIBS)
SET(SHAREDNAME ${PROJECT_NAME})
ADD_LIBRARY(${SHAREDNAME} ${meteoio_sources})
TARGET_LINK_LIBRARIES(${SHAREDNAME} ${plugin_libs} ${LIBPROJ} ${Popc_LIBRARIES} ${EXTRA_LINK_FLAGS} ${GUI_LIBS})
TARGET_LINK_LIBRARIES(${SHAREDNAME} ${plugin_libs} ${LIBPROJ} ${EXTRA_LINK_FLAGS} ${GUI_LIBS})
SET_TARGET_PROPERTIES(${SHAREDNAME} PROPERTIES
MACOSX_RPATH "${CMAKE_INSTALL_RPATH}"
PREFIX "${LIBPREFIX}"
LIBRARY_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/lib"
ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/lib"
......@@ -96,8 +97,9 @@ IF(BUILD_STATIC_LIBS)
SET(STATICNAME ${PROJECT_NAME}_STATIC)
SET(STATICLIBNAME ${PROJECT_NAME})
ADD_LIBRARY(${STATICNAME} STATIC ${meteoio_sources})
TARGET_LINK_LIBRARIES(${STATICNAME} ${plugin_libs} ${LIBPROJ} ${Popc_LIBRARIES} ${EXTRA_LINK_FLAGS} ${GUI_LIBS})
TARGET_LINK_LIBRARIES(${STATICNAME} ${plugin_libs} ${LIBPROJ} ${EXTRA_LINK_FLAGS} ${GUI_LIBS})
SET_TARGET_PROPERTIES(${STATICNAME} PROPERTIES
MACOSX_RPATH "${CMAKE_INSTALL_RPATH}"
PREFIX "${LIBPREFIX}"
LIBRARY_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/lib"
ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/lib"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment