diff Resources/CMake/Compiler.cmake @ 2448:862d943115f9

working on linux standard base
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 02 Jan 2018 18:04:11 +0100
parents f0cfacd0c9b8
children ade8b4ddd8a6
line wrap: on
line diff
--- a/Resources/CMake/Compiler.cmake	Tue Jan 02 09:35:07 2018 +0100
+++ b/Resources/CMake/Compiler.cmake	Tue Jan 02 18:04:11 2018 +0100
@@ -1,6 +1,7 @@
 # This file sets all the compiler-related flags
 
-if (CMAKE_CROSSCOMPILING)
+if (CMAKE_CROSSCOMPILING OR
+    "${CMAKE_SYSTEM_VERSION}" STREQUAL "LinuxStandardBase")
   # Cross-compilation necessarily implies standalone and static build
   SET(STATIC_BUILD ON)
   SET(STANDALONE_BUILD ON)
@@ -187,13 +188,6 @@
 endif()
 
 
-if ("${CMAKE_SYSTEM_VERSION}" STREQUAL "LinuxStandardBase")
-  SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --lsb-target-version=${LSB_TARGET_VERSION} -I${LSB_PATH}/include")
-  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --lsb-target-version=${LSB_TARGET_VERSION} -nostdinc++ -I${LSB_PATH}/include -I${LSB_PATH}/include/c++ -I${LSB_PATH}/include/c++/backward -fpermissive")
-  SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} --lsb-target-version=${LSB_TARGET_VERSION} -L${LSB_LIBPATH}")
-endif()
-
-
 if (DEFINED ENABLE_PROFILING AND ENABLE_PROFILING)
   if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
     message(WARNING "Enabling profiling on a non-debug build will not produce full information")