]> git.mxchange.org Git - simgear.git/commitdiff
Simplify Aeonwave/OpenAL logic in Cmake slightly
authorJames Turner <zakalawe@mac.com>
Sat, 6 Aug 2016 13:40:14 +0000 (14:40 +0100)
committerRoland Haeder <roland@mxchange.org>
Sat, 13 Aug 2016 08:21:16 +0000 (10:21 +0200)
CMakeLists.txt

index 999b761686097f5ef01cdeb2227689855b1c1c89..c5624f21523c3028c75a178867fb07a872d8bc3a 100644 (file)
@@ -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