aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJan Beich <[email protected]>2019-09-05 18:16:57 +0000
committerMatthew Gregan <[email protected]>2019-09-09 13:49:48 +1200
commit9456b3687f546cc9ea70c87332faaf50194214ec (patch)
tree93eb7a798d449ab8ab5069566a74889ec589d0c4
parentf33f05a1394f62c2c50b12b0496b6fce7b9df3f0 (diff)
downloadcubeb-9456b3687f546cc9ea70c87332faaf50194214ec.tar.gz
cubeb-9456b3687f546cc9ea70c87332faaf50194214ec.zip
build: simplify -ldl handling
-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)