From 8d0b4ede684df25e142b94fede4cbb15e4f6fb57 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Sun, 6 Dec 2020 19:12:35 +0100 Subject: cmake: use openal/opusfile/mpg123/libsndfile correctly --- src/CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 502255df..e943b908 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -40,19 +40,25 @@ if(RE3_AUDIO STREQUAL "OAL") find_package(OpenAL REQUIRED) target_include_directories(re3 PRIVATE ${OPENAL_INCLUDE_DIR}) target_link_libraries(re3 PRIVATE ${OPENAL_LIBRARY}) + target_compile_definitions(re3 PRIVATE ${OPENAL_DEFINITIONS}) target_compile_definitions(re3 PRIVATE AUDIO_OAL) elseif(RE3_AUDIO STREQUAL "MSS") target_compile_definitions(re3 PRIVATE AUDIO_MSS) endif() if(RE3_WITH_OPUS) + find_package(opusfile REQUIRED) + target_link_libraries(re3 PRIVATE + opusfile::opusfile + ) + target_compile_definitions(re3 PRIVATE AUDIO_OPUS) +else() find_package(mpg123 REQUIRED) find_package(SndFile REQUIRED) target_link_libraries(re3 PRIVATE MPG123::libmpg123 SndFile::SndFile ) - target_compile_definitions(re3 PRIVATE AUDIO_OPUS) endif() target_compile_definitions(re3 PRIVATE ) -- cgit v1.2.3