Fix compilation with g++-10 when GPU_SUPPORT is enabled by adding the -ldl flag

This commit is contained in:
Rahul Aggarwal 2024-01-21 18:53:08 -05:00
parent b2df50396b
commit ae26592fb7
2 changed files with 2 additions and 1 deletions

View file

@ -126,6 +126,7 @@ target_link_libraries(btop Threads::Threads)
# Enable GPU support
if(LINUX AND BTOP_GPU)
target_compile_definitions(btop PRIVATE GPU_SUPPORT)
target_link_libraries(btop ${CMAKE_DL_LIBS})
if(BTOP_RSMI_STATIC)
# ROCm doesn't properly add it's folders to the module path if `CMAKE_MODULE_PATH` is already

View file

@ -47,7 +47,7 @@ ifneq ($(GPU_SUPPORT),true)
endif
ifeq ($(GPU_SUPPORT),true)
override ADDFLAGS += -DGPU_SUPPORT
override ADDFLAGS += -DGPU_SUPPORT -ldl
endif
FORTIFY_SOURCE ?= true