cmake_modules/platform.cmake
branch0.9.20
changeset 9860 d419ff107e15
parent 9858 343d12172070
child 9887 6add6157b58e
--- a/cmake_modules/platform.cmake	Sat Dec 28 21:53:17 2013 +0100
+++ b/cmake_modules/platform.cmake	Sat Dec 28 22:00:57 2013 +0100
@@ -82,6 +82,13 @@
 
     #add user framework directory
     add_flag_append(CMAKE_Pascal_FLAGS "-Ff~/Library/Frameworks")
+
+    #workaround older cmake versions
+    if(${CMAKE_VERSION} VERSION_LESS "2.8.12")
+        add_flag_append(CMAKE_C_LINK_FLAGS "-Wl,-rpath -Wl,${CMAKE_INSTALL_RPATH}")
+        add_flag_append(CMAKE_CXX_LINK_FLAGS "-Wl,-rpath -Wl,${CMAKE_INSTALL_RPATH}")
+        add_flag_append(CMAKE_Pascal_LINK_FLAGS "-k-rpath -k${CMAKE_INSTALL_RPATH}")
+    endif()
 endif(APPLE)
 
 if(MINGW)