Browse Source

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_PROPERTY:OpenAL::OpenAL,INTERFACE_INCLUDE_DIRECTORIES>

      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.
pull/582/head
Vladimír Vondruš 4 years ago
parent
commit
742b1bb8b2
  1. 1
      src/Magnum/Audio/CMakeLists.txt

1
src/Magnum/Audio/CMakeLists.txt

@ -89,7 +89,6 @@ endif()
add_library(MagnumAudio ${SHARED_OR_STATIC}
$<TARGET_OBJECTS:MagnumAudioObjects>
${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})

Loading…
Cancel
Save