Skip to content

Commit 951933b

Browse files
committed
squash! examples : add dl to the list of libraries linked
Use CMAKE_DL_LIBS instead using if statement to link dl library on Unix systems.
1 parent 23fbfe9 commit 951933b

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

examples/CMakeLists.txt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,7 @@ add_library(${TARGET} STATIC
6161

6262
include(DefaultTargetOptions)
6363

64-
if(UNIX AND NOT APPLE)
65-
target_link_libraries(${TARGET} PRIVATE whisper ${COMMON_EXTRA_LIBS} dl)
66-
else()
67-
target_link_libraries(${TARGET} PRIVATE whisper ${COMMON_EXTRA_LIBS})
68-
endif()
64+
target_link_libraries(${TARGET} PRIVATE whisper ${COMMON_EXTRA_LIBS} ${CMAKE_DL_LIBS})
6965

7066
set_target_properties(${TARGET} PROPERTIES POSITION_INDEPENDENT_CODE ON)
7167
set_target_properties(${TARGET} PROPERTIES FOLDER "libs")

0 commit comments

Comments
 (0)