File tree 2 files changed +10
-0
lines changed
2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,11 @@ IF(NOT WIN32)
22
22
ENDIF ()
23
23
ENDIF ()
24
24
25
+ # Enable runtime search path support for dynamic libraries on OSX
26
+ IF (APPLE )
27
+ SET (CMAKE_MACOSX_RPATH 1)
28
+ ENDIF ()
29
+
25
30
SET (DEBUG_LIBNAME_SUFFIX "" CACHE STRING "Optional suffix to append to the library name for a debug build" )
26
31
SET (LIB_SUFFIX "" CACHE STRING "Optional arch-dependent suffix for the library installation directory" )
27
32
Original file line number Diff line number Diff line change @@ -46,6 +46,11 @@ IF(BUILD_SHARED_LIBS)
46
46
SET_TARGET_PROPERTIES ( jsoncpp_lib PROPERTIES OUTPUT_NAME jsoncpp
47
47
DEBUG_OUTPUT_NAME jsoncpp${DEBUG_LIBNAME_SUFFIX} )
48
48
49
+ # Set library's runtime search path on OSX
50
+ IF (APPLE )
51
+ SET_TARGET_PROPERTIES ( jsoncpp_lib PROPERTIES INSTALL_RPATH "@loader_path/." )
52
+ ENDIF ()
53
+
49
54
INSTALL ( TARGETS jsoncpp_lib ${INSTALL_EXPORT}
50
55
RUNTIME DESTINATION ${RUNTIME_INSTALL_DIR}
51
56
LIBRARY DESTINATION ${LIBRARY_INSTALL_DIR}
You can’t perform that action at this time.
0 commit comments