CMakeLists: fix issues finding libzip and efsw.

This commit is contained in:
Guillaume Jacquemin 2023-10-29 15:25:34 +01:00
parent 938bf7b8b5
commit 088f357a6b

View file

@ -27,8 +27,10 @@ endif()
find_package(Magnum REQUIRED GL Sdl2Application) find_package(Magnum REQUIRED GL Sdl2Application)
find_package(MagnumIntegration REQUIRED ImGui) find_package(MagnumIntegration REQUIRED ImGui)
find_package(CURL REQUIRED HTTPS) find_package(CURL REQUIRED HTTPS)
if(SAVETOOL_USE_SYSTEM_LIBS)
find_package(libzip REQUIRED) find_package(libzip REQUIRED)
find_package(efsw REQUIRED) find_package(efsw REQUIRED)
endif()
set_directory_properties(PROPERTIES CORRADE_USE_PEDANTIC_FLAGS ON) set_directory_properties(PROPERTIES CORRADE_USE_PEDANTIC_FLAGS ON)
@ -140,11 +142,15 @@ target_link_libraries(MassBuilderSaveTool PRIVATE
MagnumIntegration::ImGui MagnumIntegration::ImGui
Logger Logger
UESaveFile UESaveFile
efsw::efsw
libzip::zip
CURL::libcurl_static 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) if(CORRADE_TARGET_WINDOWS)
target_link_libraries(MassBuilderSaveTool PRIVATE target_link_libraries(MassBuilderSaveTool PRIVATE
Corrade::Main Corrade::Main