summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2011-02-12 18:48:42 +0100
committerGravatar Martin Szulecki2011-02-12 18:48:42 +0100
commit5e44b6bfc0ba2ee36c594caf1999eaf5d26133ed (patch)
tree82c6c12c400a2a34839da3cc87d1b860118fa707 /src
parentbe225ca1b627eb4dfc1c2e718f3f392695baeb22 (diff)
downloadlibplist-5e44b6bfc0ba2ee36c594caf1999eaf5d26133ed.tar.gz
libplist-5e44b6bfc0ba2ee36c594caf1999eaf5d26133ed.tar.bz2
Make sure install_name_tool on OSX picks up library install path
This allows dylib to correctly find the library and fixes linking on OSX.
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index afeb33b..85ce6eb 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -24,11 +24,17 @@ ADD_LIBRARY( plist SHARED ${libplist_SRC} )
TARGET_LINK_LIBRARIES( plist ${LIBXML2_LIBRARIES} ${GLIB2_LIBRARIES} )
SET_TARGET_PROPERTIES( plist PROPERTIES VERSION ${LIBPLIST_LIBVERSION} )
SET_TARGET_PROPERTIES( plist PROPERTIES SOVERSION ${LIBPLIST_SOVERSION} )
+if(APPLE)
+ SET_TARGET_PROPERTIES( plist PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
+endif()
ADD_LIBRARY( plist++ SHARED ${libplist++_SRC} )
TARGET_LINK_LIBRARIES( plist++ plist )
SET_TARGET_PROPERTIES( plist++ PROPERTIES VERSION ${LIBPLIST_LIBVERSION} )
SET_TARGET_PROPERTIES( plist++ PROPERTIES SOVERSION ${LIBPLIST_SOVERSION} )
+if(APPLE)
+ SET_TARGET_PROPERTIES( plist++ PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
+endif()
INSTALL(TARGETS plist plist++
RUNTIME DESTINATION bin COMPONENT lib