diff options
| author | 2011-02-12 18:48:42 +0100 | |
|---|---|---|
| committer | 2011-02-12 18:48:42 +0100 | |
| commit | 5e44b6bfc0ba2ee36c594caf1999eaf5d26133ed (patch) | |
| tree | 82c6c12c400a2a34839da3cc87d1b860118fa707 | |
| parent | be225ca1b627eb4dfc1c2e718f3f392695baeb22 (diff) | |
| download | libplist-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.
| -rw-r--r-- | src/CMakeLists.txt | 6 |
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} ) | |||
| 24 | TARGET_LINK_LIBRARIES( plist ${LIBXML2_LIBRARIES} ${GLIB2_LIBRARIES} ) | 24 | TARGET_LINK_LIBRARIES( plist ${LIBXML2_LIBRARIES} ${GLIB2_LIBRARIES} ) |
| 25 | SET_TARGET_PROPERTIES( plist PROPERTIES VERSION ${LIBPLIST_LIBVERSION} ) | 25 | SET_TARGET_PROPERTIES( plist PROPERTIES VERSION ${LIBPLIST_LIBVERSION} ) |
| 26 | SET_TARGET_PROPERTIES( plist PROPERTIES SOVERSION ${LIBPLIST_SOVERSION} ) | 26 | SET_TARGET_PROPERTIES( plist PROPERTIES SOVERSION ${LIBPLIST_SOVERSION} ) |
| 27 | if(APPLE) | ||
| 28 | SET_TARGET_PROPERTIES( plist PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib") | ||
| 29 | endif() | ||
| 27 | 30 | ||
| 28 | ADD_LIBRARY( plist++ SHARED ${libplist++_SRC} ) | 31 | ADD_LIBRARY( plist++ SHARED ${libplist++_SRC} ) |
| 29 | TARGET_LINK_LIBRARIES( plist++ plist ) | 32 | TARGET_LINK_LIBRARIES( plist++ plist ) |
| 30 | SET_TARGET_PROPERTIES( plist++ PROPERTIES VERSION ${LIBPLIST_LIBVERSION} ) | 33 | SET_TARGET_PROPERTIES( plist++ PROPERTIES VERSION ${LIBPLIST_LIBVERSION} ) |
| 31 | SET_TARGET_PROPERTIES( plist++ PROPERTIES SOVERSION ${LIBPLIST_SOVERSION} ) | 34 | SET_TARGET_PROPERTIES( plist++ PROPERTIES SOVERSION ${LIBPLIST_SOVERSION} ) |
| 35 | if(APPLE) | ||
| 36 | SET_TARGET_PROPERTIES( plist++ PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib") | ||
| 37 | endif() | ||
| 32 | 38 | ||
| 33 | INSTALL(TARGETS plist plist++ | 39 | INSTALL(TARGETS plist plist++ |
| 34 | RUNTIME DESTINATION bin COMPONENT lib | 40 | RUNTIME DESTINATION bin COMPONENT lib |
