From 088f357a6b54fe393d958ddd5b60a9fc51abcd07 Mon Sep 17 00:00:00 2001 From: Guillaume Jacquemin Date: Sun, 29 Oct 2023 15:25:34 +0100 Subject: [PATCH] CMakeLists: fix issues finding libzip and efsw. --- src/CMakeLists.txt | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 110a5b7..b13fe3d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -27,8 +27,10 @@ endif() find_package(Magnum REQUIRED GL Sdl2Application) find_package(MagnumIntegration REQUIRED ImGui) find_package(CURL REQUIRED HTTPS) -find_package(libzip REQUIRED) -find_package(efsw REQUIRED) +if(SAVETOOL_USE_SYSTEM_LIBS) + find_package(libzip REQUIRED) + find_package(efsw REQUIRED) +endif() set_directory_properties(PROPERTIES CORRADE_USE_PEDANTIC_FLAGS ON) @@ -140,11 +142,15 @@ target_link_libraries(MassBuilderSaveTool PRIVATE MagnumIntegration::ImGui Logger UESaveFile - efsw::efsw - libzip::zip CURL::libcurl_static ) +if(SAVETOOL_USE_SYSTEM_LIBS) + target_link_libraries(MassBuilderSaveTool PRIVATE libzip::zip efsw::efsw) +else() + target_link_libraries(MassBuilderSaveTool PRIVATE zip efsw) +endif() + if(CORRADE_TARGET_WINDOWS) target_link_libraries(MassBuilderSaveTool PRIVATE Corrade::Main