template editor

This commit is contained in:
Laserlicht
2025-06-08 15:20:49 +02:00
parent 43844e2371
commit ddd422a075
30 changed files with 4618 additions and 7 deletions
+15
View File
@@ -108,6 +108,7 @@ endif()
include(CMakeDependentOption)
cmake_dependent_option(ENABLE_INNOEXTRACT "Enable innoextract for GOG file extraction in launcher" ON "ENABLE_LAUNCHER" OFF)
cmake_dependent_option(ENABLE_GITVERSION "Enable Version.cpp with Git commit hash" ON "NOT ENABLE_GOLDMASTER" OFF)
cmake_dependent_option(ENABLE_TEMPLATE_EDITOR "Enable template editor inside map editor" ON "ENABLE_EDITOR" OFF)
option(VCMI_PORTMASTER "PortMaster build" OFF)
@@ -253,6 +254,10 @@ if(ENABLE_EDITOR)
add_definitions(-DENABLE_EDITOR)
endif()
if(ENABLE_TEMPLATE_EDITOR)
add_definitions(-DENABLE_TEMPLATE_EDITOR)
endif()
if(ENABLE_SINGLE_APP_BUILD)
add_definitions(-DENABLE_SINGLE_APP_BUILD)
endif()
@@ -521,6 +526,16 @@ if(ENABLE_LAUNCHER OR ENABLE_EDITOR)
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Widgets Network)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets Network)
if(ENABLE_TEMPLATE_EDITOR)
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Svg Xml)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Svg Xml)
if(QT_VERSION_MAJOR EQUAL 6)
find_package(QT NAMES Qt6 REQUIRED COMPONENTS SvgWidgets)
find_package(Qt6 REQUIRED COMPONENTS SvgWidgets)
endif()
endif()
if(ENABLE_TRANSLATIONS)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS LinguistTools)
add_definitions(-DENABLE_QT_TRANSLATIONS)