mirror of
https://github.com/rwengine/openrw.git
synced 2024-11-22 02:12:45 +01:00
cmake: make OpenAL an imported target
This commit is contained in:
parent
6ccf85b770
commit
5dc707aaed
13
cmake/modules/FindOpenAL.cmake
Normal file
13
cmake/modules/FindOpenAL.cmake
Normal 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()
|
@ -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
|
||||
|
@ -49,7 +49,6 @@ target_include_directories(rwgame
|
||||
SYSTEM
|
||||
PRIVATE
|
||||
${Boost_INCLUDE_DIRS}
|
||||
${OPENAL_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
target_include_directories(rwgame
|
||||
|
Loading…
Reference in New Issue
Block a user