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