From bab083d0724d5ad3267aee36d69dceda6475a673 Mon Sep 17 00:00:00 2001 From: James Turner Date: Sun, 23 Aug 2020 18:07:47 +0100 Subject: [PATCH] For static builds, ensure we find the sound library MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Should fix Erik’s issue with AeonWave. --- SimGearConfig.cmake.in | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/SimGearConfig.cmake.in b/SimGearConfig.cmake.in index 7ca03d52..9148c36a 100644 --- a/SimGearConfig.cmake.in +++ b/SimGearConfig.cmake.in @@ -10,11 +10,15 @@ set(SIMGEAR_HEADLESS @SIMGEAR_HEADLESS@) set(SIMGEAR_SOUND @ENABLE_SOUND@) set(USE_AEONWAVE @USE_AEONWAVE@) set(ENABLE_ASAN @ENABLE_ASAN@) +set(SIMGEAR_SHARED @SIMGEAR_SHARED@) -# OpenAL isn't a public dependency, so maybe not needed -#if (SIMGEAR_SOUND) -# find_dependency(OpenAL) -#endif() +if (NOT SIMGEAR_SHARED AND SIMGEAR_SOUND) + if (USE_AEONWAVE) + find_dependency(AAX) + else() + find_dependency(OpenAL) + endif() +endif() # SSE/SSE2 support @@ -36,6 +40,4 @@ if (ENABLE_GDAL) find_dependency(GDAL) endif() -set(ENABLE_OPENMP @ENABLE_OPENMP@) - include("${CMAKE_CURRENT_LIST_DIR}/SimGearTargets.cmake")