X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=CMakeLists.txt;h=336e54c47398976e2da5627a4416d2d3d9c759a4;hb=519326f7518b6e8760a53db6ebebd692655ef7be;hp=47d8e9d055476585f396938f1179468d61598f70;hpb=8f6677974eaca209d4b2fee4c04ffa2b72482e02;p=simgear.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 47d8e9d0..336e54c4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -163,6 +163,9 @@ if(APPLE) find_library(COCOA_LIBRARY Cocoa) endif() +# Somehow this only works if included before searching for Boost... +include(BoostTestTargets) + find_package(Boost REQUIRED) set (BOOST_CXX_FLAGS "-DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION -DBOOST_BIMAP_DISABLE_SERIALIZATION") @@ -178,7 +181,7 @@ else() message(STATUS "Sound support: ENABLED") endif(ENABLE_SOUND) - find_package(OpenSceneGraph 3.0.0 REQUIRED osgText osgSim osgDB osgParticle osgGA osgUtil) + find_package(OpenSceneGraph 3.2.0 REQUIRED osgText osgSim osgDB osgParticle osgGA osgViewer osgUtil) endif(SIMGEAR_HEADLESS) find_package(ZLIB REQUIRED) @@ -260,7 +263,9 @@ check_cxx_source_compiles( if(HAVE_DLFCN_H) check_library_exists(dl dlerror "" HAVE_DL) - set(DL_LIBRARY "dl") + if(HAVE_DL) + set(DL_LIBRARY "dl") + endif() endif() SET(CMAKE_DEBUG_POSTFIX "d" CACHE STRING "add a postfix, usually 'd' on windows") @@ -333,9 +338,11 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WARNING_FLAGS_C} ${MSVC_FLAGS}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARNING_FLAGS_CXX} ${MSVC_FLAGS} ${BOOST_CXX_FLAGS}") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${MSVC_LD_FLAGS}") -include_directories(${PROJECT_SOURCE_DIR}) -include_directories(${PROJECT_SOURCE_DIR}/simgear/canvas/ShivaVG/include) -include_directories(${PROJECT_BINARY_DIR}/simgear) +# use BEFORE to ensure local directories are used first, +# ahead of system-installed libs +include_directories(BEFORE ${PROJECT_SOURCE_DIR}) +include_directories(BEFORE ${PROJECT_SOURCE_DIR}/simgear/canvas/ShivaVG/include) +include_directories(BEFORE ${PROJECT_BINARY_DIR}/simgear) include_directories(${OPENSCENEGRAPH_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} @@ -378,6 +385,8 @@ endif() install (FILES ${PROJECT_BINARY_DIR}/simgear/simgear_config.h DESTINATION include/simgear/) +include_directories(3rdparty/utf8/source) + add_subdirectory(3rdparty) add_subdirectory(simgear)