From ab91bf8de86ea536b9343b33c87842fc55726195 Mon Sep 17 00:00:00 2001 From: Benjamin Reed Date: Sun, 25 Feb 2007 17:19:40 +0000 Subject: 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 --- modules/KDE4Macros.cmake | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'modules') 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 -- cgit v1.2.1