aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorBenjamin Reed <ranger@befunk.com>2007-02-25 17:19:40 +0000
committerBenjamin Reed <ranger@befunk.com>2007-02-25 17:19:40 +0000
commitab91bf8de86ea536b9343b33c87842fc55726195 (patch)
tree80c74f15b2ec8854b7db2694c1e7805aedaa35e4 /modules
parent71d71840f0342ee36fe0904959fb8947c85353fd (diff)
downloadextra-cmake-modules-ab91bf8de86ea536b9343b33c87842fc55726195.tar.gz
extra-cmake-modules-ab91bf8de86ea536b9343b33c87842fc55726195.tar.bz2
fix OSX build when DYLD_LIBRARY_PATH contains a directory with libjpeg.dylib in it (conflicts with libjpeg embedded in a system framework)
svn path=/trunk/KDE/kdelibs/; revision=637176
Diffstat (limited to 'modules')
-rw-r--r--modules/KDE4Macros.cmake9
1 files changed, 8 insertions, 1 deletions
diff --git a/modules/KDE4Macros.cmake b/modules/KDE4Macros.cmake
index f3165df2..f9955a17 100644
--- a/modules/KDE4Macros.cmake
+++ b/modules/KDE4Macros.cmake
@@ -545,7 +545,14 @@ macro (KDE4_HANDLE_RPATH_FOR_EXECUTABLE _target_NAME _type)
set(_library_path_variable "LD_LIBRARY_PATH")
endif (APPLE)
- set(_ld_library_path "${LIBRARY_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/:${LIB_INSTALL_DIR}:${KDE4_LIB_DIR}:${QT_LIBRARY_DIR}")
+ if (APPLE)
+ # DYLD_LIBRARY_PATH does not work like LD_LIBRARY_PATH
+ # OSX already has the RPATH in libraries and executables, putting runtime directories in
+ # DYLD_LIBRARY_PATH actually breaks things
+ set(_ld_library_path "${LIBRARY_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/:${KDE4_LIB_DIR}")
+ else (APPLE)
+ set(_ld_library_path "${LIBRARY_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/:${LIB_INSTALL_DIR}:${KDE4_LIB_DIR}:${QT_LIBRARY_DIR}")
+ endif (APPLE)
get_target_property(_executable ${_target_NAME} LOCATION )
# use add_custom_target() to have the sh-wrapper generated during build time instead of cmake time