# MassBuilderSaveTool # Copyright (C) 2021-2023 Guillaume Jacquemin # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) set(SAVETOOL_PROJECT_VERSION 1.5.0-pre) find_package(Corrade REQUIRED Containers Utility) if(CORRADE_TARGET_WINDOWS) find_package(Corrade REQUIRED Main) endif() find_package(Magnum REQUIRED GL Sdl2Application) find_package(MagnumIntegration REQUIRED ImGui) find_package(CURL REQUIRED HTTPS) if(SAVETOOL_USE_SYSTEM_LIBS) find_package(libzip REQUIRED) find_package(efsw REQUIRED) endif() set_directory_properties(PROPERTIES CORRADE_USE_PEDANTIC_FLAGS ON) corrade_add_resource(Assets assets.conf) add_subdirectory(Logger EXCLUDE_FROM_ALL) add_subdirectory(Gvas EXCLUDE_FROM_ALL) if(CORRADE_TARGET_WINDOWS) set(SAVETOOL_RC_FILE resource.rc) endif() add_executable(MassBuilderSaveTool main.cpp Application/Application.h Application/Application.cpp Application/Application_drawAbout.cpp Application/Application_drawMainMenu.cpp Application/Application_FileWatcher.cpp Application/Application_Initialisation.cpp Application/Application_MainManager.cpp Application/Application_MassViewer.cpp Application/Application_MassViewer_Frame.cpp Application/Application_MassViewer_Armour.cpp Application/Application_MassViewer_Weapons.cpp Application/Application_ProfileManager.cpp Application/Application_UpdateChecker.cpp Configuration/Configuration.h Configuration/Configuration.cpp ProfileManager/ProfileManager.h ProfileManager/ProfileManager.cpp Profile/Profile.h Profile/Profile.cpp Profile/PropertyNames.h Profile/ResourceIDs.h MassManager/MassManager.h MassManager/MassManager.cpp Mass/Accessory.h Mass/ArmourPart.h Mass/BulletLauncherAttachment.h Mass/CustomStyle.h Mass/Decal.h Mass/Joints.h Mass/Mass.h Mass/Mass.cpp Mass/Mass_Frame.cpp Mass/Mass_Armour.cpp Mass/Mass_Weapons.cpp Mass/Mass_Styles.cpp Mass/Mass_DecalsAccessories.cpp Mass/PropertyNames.h Mass/Weapon.h Mass/Weapon.cpp Mass/WeaponPart.h Maps/Accessories.h Maps/ArmourSets.h Maps/ArmourSlots.hpp Maps/BulletLauncherAttachmentStyles.hpp Maps/BulletLauncherSockets.hpp Maps/DamageTypes.hpp Maps/EffectColourModes.hpp Maps/LastMissionId.h Maps/StoryProgress.h Maps/StyleNames.h Maps/WeaponParts.h Maps/WeaponTypes.hpp ToastQueue/ToastQueue.h ToastQueue/ToastQueue.cpp UpdateChecker/UpdateChecker.h UpdateChecker/UpdateChecker.cpp Utilities/Crc32.h Utilities/Crc32.cpp Version/Version.h Version/Version.cpp FontAwesome/IconsFontAwesome5.h FontAwesome/IconsFontAwesome5Brands.h ${SAVETOOL_RC_FILE} ${Assets} ) if(CORRADE_TARGET_WINDOWS) set_target_properties(${PROJECT_NAME} PROPERTIES WIN32_EXECUTABLE $) endif() if(CMAKE_BUILD_TYPE STREQUAL Debug) target_compile_definitions(Logger PRIVATE SAVETOOL_DEBUG_BUILD) target_compile_definitions(MassBuilderSaveTool PRIVATE SAVETOOL_DEBUG_BUILD) endif() target_compile_definitions(MassBuilderSaveTool PRIVATE SAVETOOL_VERSION_STRING="${SAVETOOL_PROJECT_VERSION}" SAVETOOL_VERSION_MAJOR=1 SAVETOOL_VERSION_MINOR=5 SAVETOOL_VERSION_PATCH=0 SAVETOOL_VERSION_PRERELEASE=true SAVETOOL_CODENAME="Friendly Valkyrie" SAVETOOL_SUPPORTED_GAME_VERSION="0.10.x" ) if(CMAKE_BUILD_TYPE STREQUAL Release) set_target_properties(MassBuilderSaveTool PROPERTIES OUTPUT_NAME MassBuilderSaveTool-${SAVETOOL_PROJECT_VERSION}) endif() target_link_options(MassBuilderSaveTool PRIVATE -static -static-libgcc -static-libstdc++) if(CMAKE_BUILD_TYPE STREQUAL Release) target_link_options(MassBuilderSaveTool PRIVATE -Wl,-S) endif() target_link_libraries(MassBuilderSaveTool PRIVATE Corrade::Containers Corrade::Utility Magnum::Magnum Magnum::GL Magnum::Sdl2Application MagnumIntegration::ImGui Logger Gvas 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 imm32 wtsapi32 ) endif()