diff options
author | endrift <[email protected]> | 2017-07-30 13:54:50 -0700 |
---|---|---|
committer | Matthew Gregan <[email protected]> | 2017-07-31 08:54:50 +1200 |
commit | 16f9ccc064f2d0c39da5613d0d2af7783c0187d8 (patch) | |
tree | c7f7a5a9258681d73f7d476abf44aa23e6192106 /CMakeLists.txt | |
parent | 2e68530a5f72f6f4f87a48750498cd0e7900cb31 (diff) | |
download | cubeb-16f9ccc064f2d0c39da5613d0d2af7783c0187d8.tar.gz cubeb-16f9ccc064f2d0c39da5613d0d2af7783c0187d8.zip |
Fix build on FreeBSD (#344)
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 07b2383..c662964 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -99,7 +99,10 @@ if(USE_PULSE) target_sources(cubeb PRIVATE src/cubeb_pulse.c) target_compile_definitions(cubeb PRIVATE USE_PULSE) - target_link_libraries(cubeb PRIVATE pulse dl) + target_link_libraries(cubeb PRIVATE pulse) + if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") + target_link_libraries(cubeb PRIVATE dl) + endif() endif() check_include_files(alsa/asoundlib.h USE_ALSA) @@ -107,7 +110,10 @@ if(USE_ALSA) target_sources(cubeb PRIVATE src/cubeb_alsa.c) target_compile_definitions(cubeb PRIVATE USE_ALSA) - target_link_libraries(cubeb PRIVATE asound dl pthread) + target_link_libraries(cubeb PRIVATE asound pthread) + if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") + target_link_libraries(cubeb PRIVATE dl) + endif() endif() check_include_files(jack/jack.h USE_JACK) @@ -115,7 +121,10 @@ if(USE_JACK) target_sources(cubeb PRIVATE src/cubeb_jack.cpp) target_compile_definitions(cubeb PRIVATE USE_JACK) - target_link_libraries(cubeb PRIVATE jack dl pthread) + target_link_libraries(cubeb PRIVATE jack pthread) + if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") + target_link_libraries(cubeb PRIVATE dl) + endif() endif() check_include_files(audioclient.h USE_WASAPI) |