diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 7ce39ed..cce246b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -36,8 +36,89 @@ 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) +set(Logger_SOURCES + Logger/Logger.h + Logger/Logger.cpp + Logger/EntryType.h + Logger/MagnumLogBuffer.h + Logger/MagnumLogBuffer.cpp +) + +set(Gvas_SOURCES + Gvas/Serialisers/Serialisers.h + Gvas/Serialisers/AbstractUnrealCollectionProperty.h + Gvas/Serialisers/AbstractUnrealProperty.h + Gvas/Serialisers/AbstractUnrealStruct.h + Gvas/Serialisers/ArrayProperty.h + Gvas/Serialisers/ArrayProperty.cpp + Gvas/Serialisers/BoolProperty.h + Gvas/Serialisers/BoolProperty.cpp + Gvas/Serialisers/ByteProperty.h + Gvas/Serialisers/ByteProperty.cpp + Gvas/Serialisers/ColourProperty.h + Gvas/Serialisers/ColourProperty.cpp + Gvas/Serialisers/DateTimeProperty.h + Gvas/Serialisers/DateTimeProperty.cpp + Gvas/Serialisers/EnumProperty.h + Gvas/Serialisers/EnumProperty.cpp + Gvas/Serialisers/FloatProperty.h + Gvas/Serialisers/FloatProperty.cpp + Gvas/Serialisers/GuidProperty.h + Gvas/Serialisers/GuidProperty.cpp + Gvas/Serialisers/IntProperty.h + Gvas/Serialisers/IntProperty.cpp + Gvas/Serialisers/MapProperty.h + Gvas/Serialisers/MapProperty.cpp + Gvas/Serialisers/ResourceProperty.h + Gvas/Serialisers/ResourceProperty.cpp + Gvas/Serialisers/RotatorProperty.h + Gvas/Serialisers/RotatorProperty.cpp + Gvas/Serialisers/StringProperty.h + Gvas/Serialisers/StringProperty.cpp + Gvas/Serialisers/SetProperty.h + Gvas/Serialisers/SetProperty.cpp + Gvas/Serialisers/Struct.h + Gvas/Serialisers/Struct.cpp + Gvas/Serialisers/TextProperty.h + Gvas/Serialisers/TextProperty.cpp + Gvas/Serialisers/UnrealProperty.h + Gvas/Serialisers/VectorProperty.h + Gvas/Serialisers/VectorProperty.cpp + Gvas/Serialisers/Vector2DProperty.h + Gvas/Serialisers/Vector2DProperty.cpp + + Gvas/Types/Types.h + Gvas/Types/ArrayProperty.h + Gvas/Types/BoolProperty.h + Gvas/Types/ByteProperty.h + Gvas/Types/ColourStructProperty.h + Gvas/Types/DateTimeStructProperty.h + Gvas/Types/EnumProperty.h + Gvas/Types/FloatProperty.h + Gvas/Types/GenericStructProperty.h + Gvas/Types/GuidStructProperty.h + Gvas/Types/IntProperty.h + Gvas/Types/MapProperty.h + Gvas/Types/NoneProperty.h + Gvas/Types/RotatorStructProperty.h + Gvas/Types/SetProperty.h + Gvas/Types/StringProperty.h + Gvas/Types/StructProperty.h + Gvas/Types/ResourceItemValue.h + Gvas/Types/TextProperty.h + Gvas/Types/UnrealProperty.h + Gvas/Types/UnrealPropertyBase.h + Gvas/Types/Vector2DStructProperty.h + Gvas/Types/VectorStructProperty.h + + Gvas/Gvas.h + Gvas/Debug.h + Gvas/Debug.cpp + Gvas/File.h + Gvas/File.cpp + Gvas/PropertySerialiser.h + Gvas/PropertySerialiser.cpp +) if(CORRADE_TARGET_WINDOWS) set(SAVETOOL_RC_FILE resource.rc) @@ -107,6 +188,8 @@ add_executable(MassBuilderSaveTool Version/Version.cpp FontAwesome/IconsFontAwesome5.h FontAwesome/IconsFontAwesome5Brands.h + ${Logger_SOURCES} + ${Gvas_SOURCES} ${SAVETOOL_RC_FILE} ${Assets} ) @@ -115,10 +198,6 @@ 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 @@ -146,8 +225,6 @@ target_link_libraries(MassBuilderSaveTool PRIVATE Magnum::GL Magnum::Sdl2Application MagnumIntegration::ImGui - Logger - Gvas CURL::libcurl_static ) diff --git a/src/Gvas/CMakeLists.txt b/src/Gvas/CMakeLists.txt deleted file mode 100644 index 5f16a0b..0000000 --- a/src/Gvas/CMakeLists.txt +++ /dev/null @@ -1,102 +0,0 @@ -# MassBuilderSaveTool -# Copyright (C) 2021-2024 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 . - -add_library(Gvas STATIC EXCLUDE_FROM_ALL - Serialisers/Serialisers.h - Serialisers/AbstractUnrealCollectionProperty.h - Serialisers/AbstractUnrealProperty.h - Serialisers/AbstractUnrealStruct.h - Serialisers/ArrayProperty.h - Serialisers/ArrayProperty.cpp - Serialisers/BoolProperty.h - Serialisers/BoolProperty.cpp - Serialisers/ByteProperty.h - Serialisers/ByteProperty.cpp - Serialisers/ColourProperty.h - Serialisers/ColourProperty.cpp - Serialisers/DateTimeProperty.h - Serialisers/DateTimeProperty.cpp - Serialisers/EnumProperty.h - Serialisers/EnumProperty.cpp - Serialisers/FloatProperty.h - Serialisers/FloatProperty.cpp - Serialisers/GuidProperty.h - Serialisers/GuidProperty.cpp - Serialisers/IntProperty.h - Serialisers/IntProperty.cpp - Serialisers/MapProperty.h - Serialisers/MapProperty.cpp - Serialisers/ResourceProperty.h - Serialisers/ResourceProperty.cpp - Serialisers/RotatorProperty.h - Serialisers/RotatorProperty.cpp - Serialisers/StringProperty.h - Serialisers/StringProperty.cpp - Serialisers/SetProperty.h - Serialisers/SetProperty.cpp - Serialisers/Struct.h - Serialisers/Struct.cpp - Serialisers/TextProperty.h - Serialisers/TextProperty.cpp - Serialisers/UnrealProperty.h - Serialisers/VectorProperty.h - Serialisers/VectorProperty.cpp - Serialisers/Vector2DProperty.h - Serialisers/Vector2DProperty.cpp - - Types/Types.h - Types/ArrayProperty.h - Types/BoolProperty.h - Types/ByteProperty.h - Types/ColourStructProperty.h - Types/DateTimeStructProperty.h - Types/EnumProperty.h - Types/FloatProperty.h - Types/GenericStructProperty.h - Types/GuidStructProperty.h - Types/IntProperty.h - Types/MapProperty.h - Types/NoneProperty.h - Types/RotatorStructProperty.h - Types/SetProperty.h - Types/StringProperty.h - Types/StructProperty.h - Types/ResourceItemValue.h - Types/TextProperty.h - Types/UnrealProperty.h - Types/UnrealPropertyBase.h - Types/Vector2DStructProperty.h - Types/VectorStructProperty.h - - Gvas.h - Debug.h - Debug.cpp - File.h - File.cpp - BinaryReader.h - BinaryReader.cpp - BinaryWriter.h - BinaryWriter.cpp - PropertySerialiser.h - PropertySerialiser.cpp -) - -target_link_libraries(Gvas PRIVATE - Corrade::Containers - Corrade::Utility - Magnum::Magnum - Logger -) diff --git a/src/Logger/CMakeLists.txt b/src/Logger/CMakeLists.txt deleted file mode 100644 index 8ce4672..0000000 --- a/src/Logger/CMakeLists.txt +++ /dev/null @@ -1,28 +0,0 @@ -# MassBuilderSaveTool -# Copyright (C) 2021-2024 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 . - -add_library(Logger STATIC EXCLUDE_FROM_ALL - Logger.h - Logger.cpp - EntryType.h - MagnumLogBuffer.h - MagnumLogBuffer.cpp -) - -target_link_libraries(Logger PRIVATE - Corrade::Utility - Magnum::Magnum -)