From 742b1bb8b2e0cce9ac278d95b69c403729f69210 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Thu, 28 Jul 2022 13:44:00 +0200 Subject: [PATCH] Audio: remove use of an obsolete FindOpenAL variable. Funnily enough, this broke building of anything depending on the Audio library with OpenAL Soft 1.22.2. It now sets the OPENAL_INCLUDE_DIR variable for backwards compatibility purposes, but in 1.21.1 and before such variable was not set in OpenALConfig.cmake at all, thus this expression did nothing. But now using this variable by accident led to CMake Error at src/MagnumPlugins/AnyAudioImporter/CMakeLists.txt:46 (target_link_libraries): Error evaluating generator expression: $ Target "OpenAL::OpenAL" not found. which is rather strange -- the OpenAL::OpenAL target (which is a local alias scoped only to the Magnum/Audio directory from where find_package(OpenAL) was called) *is* propagated correctly from the target_link_libraries() call, but at the same time it's not propagated if it's passed via target_include_directories(). I don't know why (and probably don't want to know), in any case the expression is not needed and removing it altogether fixes everything. --- src/Magnum/Audio/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Magnum/Audio/CMakeLists.txt b/src/Magnum/Audio/CMakeLists.txt index 2f5ebe237..f0d1cee0d 100644 --- a/src/Magnum/Audio/CMakeLists.txt +++ b/src/Magnum/Audio/CMakeLists.txt @@ -89,7 +89,6 @@ endif() add_library(MagnumAudio ${SHARED_OR_STATIC} $ ${MagnumAudio_GracefulAssert_SRCS}) -target_include_directories(MagnumAudio PUBLIC ${OPENAL_INCLUDE_DIR}) set_target_properties(MagnumAudio PROPERTIES DEBUG_POSTFIX "-d") if(NOT MAGNUM_BUILD_STATIC) set_target_properties(MagnumAudio PROPERTIES VERSION ${MAGNUM_LIBRARY_VERSION} SOVERSION ${MAGNUM_LIBRARY_SOVERSION})