--- CMakeLists.txt.orig 2018-01-05 12:08:27 UTC +++ CMakeLists.txt @@ -3,6 +3,10 @@ set(OCIO_VERSION_MAJOR 1) set(OCIO_VERSION_MINOR 1) set(OCIO_VERSION_PATCH 0) +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_EXTENSIONS OFF) + cmake_minimum_required(VERSION 2.8) set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/share/cmake) if(NOT DEFINED CMAKE_FIRST_RUN) @@ -218,8 +222,7 @@ else(USE_EXTERNAL_TINYXML) ## => great news when build staticaly since we do not want another client project have to link also with tinyxml when he want to use this project ## => could be problematic if the client project use another version of tinyxml... In this case build tinyxml as shared lib with all projects could be a solution ## => TODO: so maybe provide a simple cmake way to build 3rdParty as shared and auto install with this project ? - set_target_properties(TINYXML_LIB PROPERTIES COMPILE_FLAGS "-DTIXML_USE_STL -fPIC -fvisibility-inlines-hidden -fvisibility=hidden") - add_definitions(-DTIXML_USE_STL) ## needed to build correctly, and also need to be propagated in child projects (client projects) + set_target_properties(TINYXML_LIB PROPERTIES COMPILE_FLAGS "-fPIC -fvisibility-inlines-hidden -fvisibility=hidden") list(APPEND EXTERNAL_OBJECTS $) else() find_package(Git REQUIRED) ## in order to apply patch (for crossplateform compatibility) @@ -384,7 +387,7 @@ else() set(OCIO_INLINES_HIDDEN OFF) endif() -set(EXTERNAL_COMPILE_FLAGS "-DTIXML_USE_STL ${YAML_CPP_COMPILE_FLAGS} ${GCC_COMPILE_FLAGS}") +set(EXTERNAL_COMPILE_FLAGS "${YAML_CPP_COMPILE_FLAGS} ${GCC_COMPILE_FLAGS}") set(EXTERNAL_LINK_FLAGS "") set(EXTERNAL_LIBRARY_DIRS ${PROJECT_BINARY_DIR}/ext/dist/lib)