From 6f2b81b477361dbdb960280c3a26900dcc23bae5 Mon Sep 17 00:00:00 2001 From: James Turner Date: Mon, 24 Aug 2020 11:14:16 +0100 Subject: [PATCH] Fix for the fact we find_package(AAX) all the time. Since we probe for AeonWave first, we set AAX_LIBRARY to NOT_FOUND, which then upsets CMake if we try to use it. So add some temporary ugly logic, until I have time to define a proper ALIAS target for the audio backend. --- simgear/CMakeLists.txt | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/simgear/CMakeLists.txt b/simgear/CMakeLists.txt index 505cc005..a2a722e5 100644 --- a/simgear/CMakeLists.txt +++ b/simgear/CMakeLists.txt @@ -163,10 +163,19 @@ if(NOT SIMGEAR_HEADLESS) target_link_libraries(SimGearScene PRIVATE ZLIB::ZLIB - ${OPENAL_LIBRARY} ${AAX_LIBRARY} ${OPENGL_LIBRARY} ${JPEG_LIBRARY}) + # ToDo: define an ALIAS target for the sound backend, to get + # rid of this logic here + if (ENABLE_SOUND) + if (USE_AEONWAVE) + target_link_libraries(SimGearScene PRIVATE ${AAX_LIBRARY}) + else() + target_link_libraries(SimGearScene PRIVATE ${OPENAL_LIBRARY} ) + endif() + endif() + if(ENABLE_GDAL) # FIXME: should be RIVATE, but we leak GDAL headers # in our own headers :(