From 8bbc985d9819db23efed90823b281e212a6a116b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Fri, 27 Sep 2024 00:19:07 +0800 Subject: [PATCH] CMake: fix more linking errors in dynamic mode --- CMakeLists.txt | 8 ++++++++ src/detection/gpu/gpu_mthreads.c | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 340f0a520..819e16402 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1169,6 +1169,14 @@ if(LINUX) target_link_libraries(libfastfetch PRIVATE "m" ) + + if(ENABLE_DIRECTX_HEADERS) + if(NOT BINARY_LINK_TYPE STREQUAL "dlopen") + target_link_libraries(libfastfetch + PRIVATE "/usr/lib/wsl/lib/libdxcore.so" + ) + endif() + endif() elseif(APPLE) target_link_libraries(libfastfetch PRIVATE "-framework AVFoundation" diff --git a/src/detection/gpu/gpu_mthreads.c b/src/detection/gpu/gpu_mthreads.c index 7af21c58f..80164320d 100644 --- a/src/detection/gpu/gpu_mthreads.c +++ b/src/detection/gpu/gpu_mthreads.c @@ -30,7 +30,7 @@ struct FFMtmlData MtmlSystem *sys; } mtmlData; -static void shutdownMtml() +FF_MAYBE_UNUSED static void shutdownMtml(void) { mtmlData.ffmtmlLibraryShutDown(mtmlData.lib); }