Commit 4b69400b authored by Guillaume Pasero's avatar Guillaume Pasero

ENH: use the prior include flag for all platforms

parent 156ef832
......@@ -137,9 +137,6 @@ if(APPLE)
env
${LDLIBVAR}=${CMAKE_INSTALL_PREFIX}/lib:$ENV{${LDLIBVAR}}
${CMAKE_COMMAND})
list(APPEND OTB_SB_CONFIG
-DCMAKE_C_FLAGS:STRING=-I${CMAKE_INSTALL_PREFIX}/include
-DCMAKE_CXX_FLAGS:STRING=-I${CMAKE_INSTALL_PREFIX}/include)
else()
set(OTB_SB_CMAKE_COMMAND ${SB_CMAKE_COMMAND})
endif()
......@@ -147,8 +144,8 @@ endif()
# forward compilation flags
set(OTB_SB_COMPILATION_FLAGS
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
-DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}
-DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}
-DCMAKE_C_FLAGS:STRING="${SB_PRIOR_INCLUDE_FLAGS} ${CMAKE_C_FLAGS}"
-DCMAKE_CXX_FLAGS:STRING="${SB_PRIOR_INCLUDE_FLAGS} ${CMAKE_CXX_FLAGS}"
-DCMAKE_EXE_LINKER_FLAGS:STRING=${CMAKE_EXE_LINKER_FLAGS}
-DCMAKE_MODULE_LINKER_FLAGS:STRING=${CMAKE_MODULE_LINKER_FLAGS}
-DCMAKE_SHARED_LINKER_FLAGS:STRING=${CMAKE_SHARED_LINKER_FLAGS}
......
......@@ -62,6 +62,7 @@ if(WIN32)
if(MSVC)
set(SB_CMAKE_COMMAND ${CMAKE_COMMAND})
set(SB_BUILD_SHARED_LIBS OFF)
set(SB_PRIOR_INCLUDE_FLAGS "/I\"${CMAKE_INSTALL_PREFIX}/include\"")
endif()
else(UNIX)
if(APPLE)
......@@ -74,6 +75,7 @@ else(UNIX)
set(SB_CMAKE_COMMAND env ${LDLIBVAR}=${CMAKE_INSTALL_PREFIX}/lib:$ENV{${LDLIBVAR}} CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} ${CMAKE_COMMAND})
message(STATUS "Environment setup for Configure : ${SB_ENV_CONFIGURE_CMD}")
endif()
set(SB_PRIOR_INCLUDE_FLAGS "-I${CMAKE_INSTALL_PREFIX}/include")
endif()
# Call external projects
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment