Skip to content

Commit 23fbfe9

Browse files
committed
squash! examples : add dl to the list of libraries linked
Add guard to only link dl on non-Apple Unix systems.
1 parent b70d60f commit 23fbfe9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

examples/CMakeLists.txt

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

6262
include(DefaultTargetOptions)
6363

64-
target_link_libraries(${TARGET} PRIVATE whisper ${COMMON_EXTRA_LIBS} dl)
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()
6569

6670
set_target_properties(${TARGET} PROPERTIES POSITION_INDEPENDENT_CODE ON)
6771
set_target_properties(${TARGET} PROPERTIES FOLDER "libs")

0 commit comments

Comments
 (0)