diff --git a/CMakeLists.txt b/CMakeLists.txt index 1c6eed1c42..d6fa6c3aad 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1220,6 +1220,9 @@ endif() if(NOT BINARY_LINK_TYPE STREQUAL "dlopen") message(STATUS "Enabling custom link type: ${BINARY_LINK_TYPE}") target_compile_definitions(libfastfetch PRIVATE FF_DISABLE_DLOPEN=1) + if(NOT WIN32) + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--copy-dt-needed-entries") + endif() endif() function(ff_lib_enable VARNAME PKGCONFIG_NAMES CMAKE_NAME)