Commit 754d4be3 authored by Antoine Regimbeau's avatar Antoine Regimbeau

PKG: add the abi compatibility only to UseOTB.cmake's package

parent 5b7bdb56
......@@ -23,13 +23,6 @@
# included directly, but rather through the OTB_USE_FILE setting
# obtained from OTBConfig.cmake.
# ABI compatibility
if ( CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 5.0 )
add_definitions(-D_GLIBCXX_USE_CXX11_ABI=0)
endif()
endif()
# Add compiler flags needed to use OTB.
set(CMAKE_C_FLAGS "${OTB_REQUIRED_C_FLAGS} ${CMAKE_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${OTB_REQUIRED_CXX_FLAGS} ${CMAKE_CXX_FLAGS}")
......
......@@ -59,5 +59,17 @@ function(patch_cmake_files)
# endforeach()
# endif()
# file(WRITE "${otb_opengl}" ${otb_opengl_cmake_NEW})
#patch for ABI compatibility
if(EXISTS "${PATCH_STAGE_DIR}/UseOTB.cmake")
file(APPEND "${PATCH_STAGE_DIR}/UseOTB.cmake"
"\n# ABI compatibility
if ( CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 5.0 )
add_definitions(-D_GLIBCXX_USE_CXX11_ABI=0)
endif()
endif()" )
endif()
endfunction()
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