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.
This commit is contained in:
James Turner
2020-08-24 11:14:16 +01:00
parent af1b170059
commit 6f2b81b477

View File

@@ -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 :(