Skip to content

Commit 7884d45

Browse files
Fix linking of examples on Ubuntu 20
Just link some examples with DL (dlopen, dlclose, ...).
1 parent 7d14005 commit 7884d45

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414

1515
build/
1616
build-*/
17+
debug/
18+
release/
1719

1820
# SPM
1921
.build/
@@ -59,4 +61,4 @@ cmake-build-debug/
5961
.gradle/
6062
local.properties
6163
.log
62-
.exe
64+
.exe

examples/cli/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ add_executable(${TARGET} cli.cpp)
33

44
include(DefaultTargetOptions)
55

6-
target_link_libraries(${TARGET} PRIVATE common whisper ${FFMPEG_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
6+
target_link_libraries(${TARGET} PRIVATE common whisper ${FFMPEG_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS})
77

88
install(TARGETS ${TARGET} RUNTIME)

examples/server/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ add_executable(${TARGET} server.cpp httplib.h)
33

44
include(DefaultTargetOptions)
55

6-
target_link_libraries(${TARGET} PRIVATE common json_cpp whisper ${CMAKE_THREAD_LIBS_INIT})
6+
target_link_libraries(${TARGET} PRIVATE common json_cpp whisper ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS})
77

88
if (WIN32)
99
target_link_libraries(${TARGET} PRIVATE ws2_32)

ggml/src/ggml-cuda/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.18) # for CMAKE_CUDA_ARCHITECTURES
33
find_package(CUDAToolkit)
44

55
if (CUDAToolkit_FOUND)
6-
message(STATUS "CUDA Toolkit found")
6+
message(STATUS "CUDA Toolkit found: ${CUDAToolkit_VERSION}")
77

88
if (NOT DEFINED CMAKE_CUDA_ARCHITECTURES)
99
# native == GPUs available at build time

0 commit comments

Comments
 (0)