Browse Source

modules: add a TODO for CMake 3.10.

pull/168/head
Vladimír Vondruš 3 years ago
parent
commit
5d8686e0b8
  1. 5
      modules/FindOpenAL.cmake

5
modules/FindOpenAL.cmake

@ -70,6 +70,11 @@ if(TARGET OpenAL OR TARGET OpenAL::OpenAL)
# INTERFACE_INCLUDE_DIRECTORIES for some reason (apparently the # INTERFACE_INCLUDE_DIRECTORIES for some reason (apparently the
# $<BUILD_INTERFACE:> in there doesn't work or whatever), so let's do # $<BUILD_INTERFACE:> in there doesn't work or whatever), so let's do
# that ourselves. # that ourselves.
#
# TODO this could be probably fixable by using target_link_libraries()
# instead of set_target_properties() because it evaluates generator
# expressions, but that needs CMake 3.10+, before that
# target_link_libraries() can't be called on INTERFACE targets.
get_target_property(_OPENAL_SOURCE_DIR OpenAL SOURCE_DIR) get_target_property(_OPENAL_SOURCE_DIR OpenAL SOURCE_DIR)
set_target_properties(OpenAL::OpenAL PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${_OPENAL_SOURCE_DIR}/include/AL) set_target_properties(OpenAL::OpenAL PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${_OPENAL_SOURCE_DIR}/include/AL)

Loading…
Cancel
Save