summaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authorAnonymous Maarten <anonymous.maarten@gmail.com>2021-01-11 01:29:43 +0100
committershfil <filip.gawin@zoho.com>2021-01-11 11:24:25 +0100
commitb375e20c75194fc5559b2c54899f4841e7e2cb48 (patch)
tree008059be9c0925ca7f648d9d7e34953a2780ff1c /src/CMakeLists.txt
parentd9f6a05b7eeba6316426b4efd6c1777d6fcc5741 (diff)
cmake: opus is now optional + libsndfile only when using openal
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index a7c2a3d7..0460a353 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -55,19 +55,23 @@ elseif(RE3_AUDIO STREQUAL "MSS")
target_link_libraries(re3 PRIVATE MilesSDK::MilesSDK)
endif()
+find_package(mpg123 REQUIRED)
+target_link_libraries(re3 PRIVATE
+ MPG123::libmpg123
+)
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)
+endif()
+if(RE3_WITH_LIBSNDFILE)
find_package(SndFile REQUIRED)
target_link_libraries(re3 PRIVATE
- MPG123::libmpg123
SndFile::SndFile
)
+ target_compile_definitions(re3 PRIVATE AUDIO_OAL_USE_SNDFILE)
endif()
target_compile_definitions(re3 PRIVATE )