From e2d8e13831491f3e77f9da7d833305c2660bfb94 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 f3db9b6..3564999 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -178,6 +178,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)