cmake: link to CMAKE_DL_LIBS

Link btop to ${CMAKE_DL_LIBS} when
building using shared libs and GPU support on linux
This commit is contained in:
Massimiliano Culpo 2024-01-18 12:07:14 +01:00
parent b2df50396b
commit e10ef35a1c
No known key found for this signature in database
GPG Key ID: 3E52BB992233066C
1 changed files with 3 additions and 0 deletions

View File

@ -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)