]> granicus.if.org Git - libjpeg-turbo/commitdiff
Build: Don't use @rpath with OS X 10.4 builds
authorDRC <information@libjpeg-turbo.org>
Wed, 25 Jul 2018 02:16:00 +0000 (21:16 -0500)
committerDRC <information@libjpeg-turbo.org>
Wed, 25 Jul 2018 02:32:16 +0000 (21:32 -0500)
@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.

CMakeLists.txt
sharedlib/CMakeLists.txt

index d378ef2655ef08ce56a379e3c1f83a6cc9446975..2d105d665c79b152545a74cd5d15efbeb354a36d 100644 (file)
@@ -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()
index 2d601701dcca7c389246b4aaf3ba2636982f806b..2bab8320d2ba2d96d3fd40bacbf816b1fec056c5 100755 (executable)
@@ -40,7 +40,8 @@ add_library(jpeg SHARED ${JPEG_SRCS} ${DEFFILE} $<TARGET_OBJECTS:simd>
 
 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()