File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -96,7 +96,19 @@ SET_TARGET_PROPERTIES(${LOG4CPP_LIBRARY_NAME} PROPERTIES VERSION ${VERSION} SOVE
9696# in dependent libraries/executables. Without this, CMake drops the path and
9797# the dependency becomes just the lib name (which requires working DYLD_xxx)
9898SET_TARGET_PROPERTIES (${LOG4CPP_LIBRARY_NAME} PROPERTIES
99- INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX} /lib" )
99+ INSTALL_RPATH_USE_LINK_PATH ON )
100+ # Set INSTALL_NAME_DIR for MacOS X to tell users of this library how to find it:
101+ if (APPLE )
102+ if (CMAKE_VERSION VERSION_LESS "3.0.0" )
103+ SET_TARGET_PROPERTIES ( ${LOG4CPP_LIBRARY_NAME} PROPERTIES
104+ INSTALL_NAME_DIR "@rpath"
105+ )
106+ else ()
107+ # cope with CMake 3.x
108+ SET_TARGET_PROPERTIES ( ${LOG4CPP_LIBRARY_NAME} PROPERTIES
109+ MACOSX_RPATH ON )
110+ endif ()
111+ endif ()
100112
101113ADD_DEFINITIONS (${LOG4CPP_CFLAGS} )
102114
You can’t perform that action at this time.
0 commit comments