File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,11 @@ IF(NOT WIN32)
2222 ENDIF ()
2323ENDIF ()
2424
25+ # Enable runtime search path support for dynamic libraries on OSX
26+ IF (APPLE )
27+ SET (CMAKE_MACOSX_RPATH 1)
28+ ENDIF ()
29+
2530SET (DEBUG_LIBNAME_SUFFIX "" CACHE STRING "Optional suffix to append to the library name for a debug build" )
2631SET (LIB_SUFFIX "" CACHE STRING "Optional arch-dependent suffix for the library installation directory" )
2732
Original file line number Diff line number Diff line change @@ -46,6 +46,11 @@ IF(BUILD_SHARED_LIBS)
4646 SET_TARGET_PROPERTIES ( jsoncpp_lib PROPERTIES OUTPUT_NAME jsoncpp
4747 DEBUG_OUTPUT_NAME jsoncpp${DEBUG_LIBNAME_SUFFIX} )
4848
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+
4954 INSTALL ( TARGETS jsoncpp_lib ${INSTALL_EXPORT}
5055 RUNTIME DESTINATION ${RUNTIME_INSTALL_DIR}
5156 LIBRARY DESTINATION ${LIBRARY_INSTALL_DIR}
You can’t perform that action at this time.
0 commit comments