cmake_modules/platform.cmake
changeset 9673 5be4de0eb4b0
parent 9517 217eacb69395
child 9705 322fe1736347
child 9858 343d12172070
--- a/cmake_modules/platform.cmake	Sun Nov 03 14:45:07 2013 -0500
+++ b/cmake_modules/platform.cmake	Sun Nov 03 22:53:16 2013 +0100
@@ -110,3 +110,9 @@
         message(FATAL_ERROR "Static linking is not supported on Windows")
     endif()
 endif(WIN32)
+
+if(UNIX)
+    add_flag_append(CMAKE_C_FLAGS "-fPIC")
+    add_flag_append(CMAKE_CXX_FLAGS "-fPIC")
+    add_flag_append(CMAKE_Pascal_FLAGS "-fPIC")
+endif(UNIX)