cmake_modules/platform.cmake
changeset 9673 5be4de0eb4b0
parent 9517 217eacb69395
child 9705 322fe1736347
child 9858 343d12172070
equal deleted inserted replaced
9672:8663d299ba62 9673:5be4de0eb4b0
   108 if(WIN32)
   108 if(WIN32)
   109     if(NOT ${BUILD_SHARED_LIB})
   109     if(NOT ${BUILD_SHARED_LIB})
   110         message(FATAL_ERROR "Static linking is not supported on Windows")
   110         message(FATAL_ERROR "Static linking is not supported on Windows")
   111     endif()
   111     endif()
   112 endif(WIN32)
   112 endif(WIN32)
       
   113 
       
   114 if(UNIX)
       
   115     add_flag_append(CMAKE_C_FLAGS "-fPIC")
       
   116     add_flag_append(CMAKE_CXX_FLAGS "-fPIC")
       
   117     add_flag_append(CMAKE_Pascal_FLAGS "-fPIC")
       
   118 endif(UNIX)