CMakeLists.txt
changeset 10043 24e8d042e532
parent 10034 8764bcc13666
child 10044 8fc20bbbed5c
--- a/CMakeLists.txt	Thu Jan 07 16:01:24 2016 -0500
+++ b/CMakeLists.txt	Thu Jan 07 16:42:30 2016 -0800
@@ -958,6 +958,12 @@
     set(SDL_RLD_FLAGS "")
     if(BSDI OR FREEBSD OR LINUX OR NETBSD)
       set(SDL_RLD_FLAGS "-Wl,-rpath,\${libdir}")
+      set(CMAKE_REQUIRED_FLAGS "-Wl,--enable-new-dtags")
+      check_c_compiler_flag("" HAVE_ENABLE_NEW_DTAGS)
+      set(CMAKE_REQUIRED_FLAGS ${ORIG_CMAKE_REQUIRED_FLAGS})
+      if(HAVE_ENABLE_NEW_DTAGS)
+        list(APPEND SDL_RLD_FLAGS "-Wl,--enable-new-dtags")
+      endif()
     elseif(SOLARIS)
       set(SDL_RLD_FLAGS "-R\${libdir}")
     endif()