Skip to content

Commit

Permalink
cmake: enable CMP0042 to use @rpath
Browse files Browse the repository at this point in the history
  • Loading branch information
saper committed Jun 10, 2024
1 parent 3afa40c commit 794f3cb
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ if(${CMAKE_VERSION} VERSION_GREATER "3.4")
CMAKE_MINIMUM_REQUIRED (VERSION 3.5)
else()
CMAKE_MINIMUM_REQUIRED (VERSION 2.8.12)
CMAKE_POLICY(SET CMP0042 NEW)
IF ((CMAKE_VERSION VERSION_GREATER 3.1) OR
(CMAKE_VERSION VERSION_EQUAL 3.1))
CMAKE_POLICY(SET CMP0054 NEW)
Expand Down Expand Up @@ -52,18 +53,6 @@ CONFIGURE_FILE (
@ONLY
)

IF (APPLE)
SET(CMAKE_MACOSX_RPATH ON)
SET(CMAKE_SKIP_BUILD_RPATH FALSE)
SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
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 ()
ENDIF ()

IF (MSGPACK_32BIT)
IF ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
SET (CMAKE_C_FLAGS "-m32 ${CMAKE_C_FLAGS}")
Expand Down

0 comments on commit 794f3cb

Please sign in to comment.