Skip to content

Commit

Permalink
CMake: fix possible linking errors in BINARY_LINK_TYPE=dynamic mode
Browse files Browse the repository at this point in the history
  • Loading branch information
CarterLi committed Nov 20, 2024
1 parent a567268 commit 71b073e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 71b073e

Please sign in to comment.