Simplify Aeonwave/OpenAL logic in Cmake slightly

This commit is contained in:
James Turner 2016-08-06 14:40:14 +01:00
parent 8d266491c5
commit a31d1342d5

View File

@ -192,11 +192,10 @@ if (MSVC AND MSVC_3RDPARTY_ROOT)
) )
# set (BOOST_ROOT ${MSVC_3RDPARTY_ROOT}/boost_1_44_0) # set (BOOST_ROOT ${MSVC_3RDPARTY_ROOT}/boost_1_44_0)
message(STATUS "BOOST_ROOT is ${BOOST_ROOT}") message(STATUS "BOOST_ROOT is ${BOOST_ROOT}")
if (USE_AEONWAVE) if (NOT USE_AEONWAVE)
find_package(AAX COMPONENTS aax REQUIRED)
else()
set (OPENAL_INCLUDE_DIR ${MSVC_3RDPARTY_ROOT}/${MSVC_3RDPARTY_DIR}/include) set (OPENAL_INCLUDE_DIR ${MSVC_3RDPARTY_ROOT}/${MSVC_3RDPARTY_DIR}/include)
set (OPENAL_LIBRARY_DIR ${MSVC_3RDPARTY_ROOT}/${MSVC_3RDPARTY_DIR}/lib) set (OPENAL_LIBRARY_DIR ${MSVC_3RDPARTY_ROOT}/${MSVC_3RDPARTY_DIR}/lib)
message(STATUS "OPENAL_INCLUDE_DIR is ${OPENAL_INCLUDE_DIR}")
endif() endif()
endif (MSVC AND MSVC_3RDPARTY_ROOT) endif (MSVC AND MSVC_3RDPARTY_ROOT)
@ -226,7 +225,14 @@ else()
find_package(OpenGL REQUIRED) find_package(OpenGL REQUIRED)
if (ENABLE_SOUND) if (ENABLE_SOUND)
if (USE_AEONWAVE)
find_package(AAX COMPONENTS aax REQUIRED)
include_directories( ${AAX_INCLUDE_DIR} )
else()
find_package(OpenAL REQUIRED) find_package(OpenAL REQUIRED)
include_directories( ${OPENAL_INCLUDE_DIR} )
endif()
message(STATUS "Sound support: ENABLED") message(STATUS "Sound support: ENABLED")
endif(ENABLE_SOUND) endif(ENABLE_SOUND)
@ -407,14 +413,6 @@ include_directories(${OPENSCENEGRAPH_INCLUDE_DIRS}
${CURL_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) add_definitions(-DHAVE_CONFIG_H)
# configure a header file to pass some of the CMake settings # configure a header file to pass some of the CMake settings