Skip to content

Commit 71b073e

Browse files
committed
CMake: fix possible linking errors in BINARY_LINK_TYPE=dynamic mode
1 parent a567268 commit 71b073e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1220,6 +1220,9 @@ endif()
12201220
if(NOT BINARY_LINK_TYPE STREQUAL "dlopen")
12211221
message(STATUS "Enabling custom link type: ${BINARY_LINK_TYPE}")
12221222
target_compile_definitions(libfastfetch PRIVATE FF_DISABLE_DLOPEN=1)
1223+
if(NOT WIN32)
1224+
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--copy-dt-needed-entries")
1225+
endif()
12231226
endif()
12241227

12251228
function(ff_lib_enable VARNAME PKGCONFIG_NAMES CMAKE_NAME)

0 commit comments

Comments
 (0)