From 3f61538844435ed92a990aadb50bc388705cb559 Mon Sep 17 00:00:00 2001 From: Nadia Holmquist Pedersen Date: Sat, 15 Apr 2023 23:18:10 +0200 Subject: [PATCH] Okay FINE let's use pkg-config then what's even the point of find_package when distros don't ship CMake scripts for a damn thing --- src/frontend/qt_sdl/CMakeLists.txt | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/frontend/qt_sdl/CMakeLists.txt b/src/frontend/qt_sdl/CMakeLists.txt index 63bf53ee..d3fab933 100644 --- a/src/frontend/qt_sdl/CMakeLists.txt +++ b/src/frontend/qt_sdl/CMakeLists.txt @@ -82,9 +82,9 @@ endif() pkg_check_modules(SDL2 REQUIRED IMPORTED_TARGET sdl2) pkg_check_modules(Slirp REQUIRED IMPORTED_TARGET slirp) pkg_check_modules(LibArchive REQUIRED IMPORTED_TARGET libarchive) +pkg_check_modules(Zstd IMPORTED_TARGET libzstd) -find_package(zstd CONFIG) -cmake_dependent_option(ENABLE_ZSTD "Enable support for Zstandard-compressed ROMs" ON "zstd_FOUND" OFF) +cmake_dependent_option(ENABLE_ZSTD "Enable support for Zstandard-compressed ROMs" ON "Zstd_FOUND" OFF) fix_interface_includes(PkgConfig::SDL2 PkgConfig::Slirp PkgConfig::LibArchive) @@ -162,11 +162,7 @@ target_link_libraries(melonDS PRIVATE ${QT_LINK_LIBS} ${CMAKE_DL_LIBS}) if (ENABLE_ZSTD) target_compile_definitions(melonDS PRIVATE ZSTD_ENABLED) - if (BUILD_STATIC) - target_link_libraries(melonDS PRIVATE zstd::libzstd_static) - else() - target_link_libraries(melonDS PRIVATE zstd::libzstd_shared) - endif() + target_link_libraries(melonDS PRIVATE PkgConfig::Zstd) endif() if (UNIX)