From e10ef35a1c63414ed71c26e1cf9008232bc97ac4 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Thu, 18 Jan 2024 12:07:14 +0100 Subject: [PATCH] cmake: link to CMAKE_DL_LIBS Link btop to ${CMAKE_DL_LIBS} when building using shared libs and GPU support on linux --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index cd39946..2244e0c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -151,6 +151,9 @@ if(LINUX AND BTOP_GPU) target_link_libraries(btop ROCm) endif() + if(NOT BTOP_STATIC) + target_link_libraries(btop ${CMAKE_DL_LIBS}) + endif() endif() if(BTOP_USE_MOLD)