From: James Turner Date: Sat, 6 Aug 2016 13:40:14 +0000 (+0100) Subject: Simplify Aeonwave/OpenAL logic in Cmake slightly X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=1bb1406b0b1c6319e2f03a843e0118c3e5988d90;p=simgear.git Simplify Aeonwave/OpenAL logic in Cmake slightly --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 999b7616..c5624f21 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -192,11 +192,10 @@ if (MSVC AND MSVC_3RDPARTY_ROOT) ) # set (BOOST_ROOT ${MSVC_3RDPARTY_ROOT}/boost_1_44_0) message(STATUS "BOOST_ROOT is ${BOOST_ROOT}") - if (USE_AEONWAVE) - find_package(AAX COMPONENTS aax REQUIRED) - else() + if (NOT USE_AEONWAVE) set (OPENAL_INCLUDE_DIR ${MSVC_3RDPARTY_ROOT}/${MSVC_3RDPARTY_DIR}/include) set (OPENAL_LIBRARY_DIR ${MSVC_3RDPARTY_ROOT}/${MSVC_3RDPARTY_DIR}/lib) + message(STATUS "OPENAL_INCLUDE_DIR is ${OPENAL_INCLUDE_DIR}") endif() endif (MSVC AND MSVC_3RDPARTY_ROOT) @@ -224,7 +223,14 @@ else() find_package(OpenGL REQUIRED) if (ENABLE_SOUND) - find_package(OpenAL REQUIRED) + if (USE_AEONWAVE) + find_package(AAX COMPONENTS aax REQUIRED) + include_directories( ${AAX_INCLUDE_DIR} ) + else() + find_package(OpenAL REQUIRED) + include_directories( ${OPENAL_INCLUDE_DIR} ) + endif() + message(STATUS "Sound support: ENABLED") endif(ENABLE_SOUND) @@ -405,14 +411,6 @@ include_directories(${OPENSCENEGRAPH_INCLUDE_DIRS} ${CURL_INCLUDE_DIRS} ) -include_directories( ${OPENSCENEGRAPH_INCLUDE_DIRS} ) -if (USE_AEONWAVE) - find_package(AAX COMPONENTS aax REQUIRED) - include_directories( ${AAX_INCLUDE_DIR} ) -else() - include_directories( ${OPENAL_INCLUDE_DIR} ) -endif() - add_definitions(-DHAVE_CONFIG_H) # configure a header file to pass some of the CMake settings