1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-10-06 09:07:19 +02:00

cmake: make OpenAL an imported target

This commit is contained in:
Anonymous Maarten 2017-10-26 03:43:27 +02:00 committed by Daniel Evans
parent 6ccf85b770
commit 5dc707aaed
3 changed files with 14 additions and 9 deletions

View File

@ -0,0 +1,13 @@
# Override CMake's FindBullet module:
# create an IMPORTED TARGET
include("${CMAKE_ROOT}/Modules/FindOpenAL.cmake")
if(OPENAL_FOUND)
add_library(OpenAL::OpenAL UNKNOWN IMPORTED)
set_target_properties(OpenAL::OpenAL PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "C;CXX"
IMPORTED_LOCATION "${OPENAL_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${OPENAL_INCLUDE_DIR}"
)
endif()

View File

@ -151,14 +151,7 @@ target_link_libraries(rwengine
bullet::bullet
ffmpeg::ffmpeg
glm::glm
PRIVATE
${OPENAL_LIBRARY}
)
target_include_directories(rwengine
SYSTEM
PUBLIC
${OPENAL_INCLUDE_DIR}
OpenAL::OpenAL
)
target_include_directories(rwengine

View File

@ -49,7 +49,6 @@ target_include_directories(rwgame
SYSTEM
PRIVATE
${Boost_INCLUDE_DIRS}
${OPENAL_INCLUDE_DIR}
)
target_include_directories(rwgame