From: DRC Date: Wed, 25 Jul 2018 02:16:00 +0000 (-0500) Subject: Build: Don't use @rpath with OS X 10.4 builds X-Git-Tag: 2.0.0~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8d95be3afb4dad14cfac62eccee65ef30cdb6540;p=libjpeg-turbo Build: Don't use @rpath with OS X 10.4 builds @rpath is only supported with 10.5 and later deployment targets. libjpeg-turbo hasn't supported 10.4 "Tiger" since prior to 1.4, but I still sometimes use the 10.4 SDK to test PowerPC code in a Snow Leopard VM. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index d378ef2..2d105d6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -577,7 +577,8 @@ if(WITH_TURBOJPEG) if(MINGW) set_target_properties(turbojpeg PROPERTIES LINK_FLAGS -Wl,--kill-at) endif() - if(APPLE) + if(APPLE AND (NOT CMAKE_OSX_DEPLOYMENT_TARGET OR + CMAKE_OSX_DEPLOYMENT_TARGET VERSION_GREATER 10.4)) if(NOT CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG) set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,") endif() diff --git a/sharedlib/CMakeLists.txt b/sharedlib/CMakeLists.txt index 2d60170..2bab832 100755 --- a/sharedlib/CMakeLists.txt +++ b/sharedlib/CMakeLists.txt @@ -40,7 +40,8 @@ add_library(jpeg SHARED ${JPEG_SRCS} ${DEFFILE} $ set_target_properties(jpeg PROPERTIES SOVERSION ${SO_MAJOR_VERSION} VERSION ${SO_MAJOR_VERSION}.${SO_AGE}.${SO_MINOR_VERSION}) -if(APPLE) +if(APPLE AND (NOT CMAKE_OSX_DEPLOYMENT_TARGET OR + CMAKE_OSX_DEPLOYMENT_TARGET VERSION_GREATER 10.4)) if(NOT CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG) set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,") endif()