aboutsummaryrefslogtreecommitdiffhomepage
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt15
1 files changed, 3 insertions, 12 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b32a53a..ec59316 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -155,10 +155,7 @@ if(USE_PULSE)
target_sources(cubeb PRIVATE
src/cubeb_pulse.c)
target_compile_definitions(cubeb PRIVATE USE_PULSE)
- target_link_libraries(cubeb PRIVATE pulse pthread)
- if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
- target_link_libraries(cubeb PRIVATE dl)
- endif()
+ target_link_libraries(cubeb PRIVATE pulse pthread ${CMAKE_DL_LIBS})
endif()
check_include_files(alsa/asoundlib.h USE_ALSA)
@@ -166,10 +163,7 @@ if(USE_ALSA)
target_sources(cubeb PRIVATE
src/cubeb_alsa.c)
target_compile_definitions(cubeb PRIVATE USE_ALSA)
- target_link_libraries(cubeb PRIVATE asound pthread)
- if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
- target_link_libraries(cubeb PRIVATE dl)
- endif()
+ target_link_libraries(cubeb PRIVATE asound pthread ${CMAKE_DL_LIBS})
endif()
check_include_files(jack/jack.h USE_JACK)
@@ -177,10 +171,7 @@ if(USE_JACK)
target_sources(cubeb PRIVATE
src/cubeb_jack.cpp)
target_compile_definitions(cubeb PRIVATE USE_JACK)
- target_link_libraries(cubeb PRIVATE jack pthread)
- if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
- target_link_libraries(cubeb PRIVATE dl)
- endif()
+ target_link_libraries(cubeb PRIVATE jack pthread ${CMAKE_DL_LIBS})
endif()
check_include_files(audioclient.h USE_WASAPI)