feat: Enable Unity builds for faster compilation
- Added an option to enable Unity (Jumbo) builds in CMake. - Updated CMakeLists.txt to conditionally set CMAKE_UNITY_BUILD and batch size. - Removed outdated analysis documentation for overworld implementation. - Deleted z3ed resources YAML file as it is no longer needed. - Refactored CMake files to modularize the build system, separating core, editor, gfx, gui, and zelda3 components into library files. - Added precompiled headers for various libraries to improve compilation times. - Updated yaze_config.h.in to define IMGUI_DEFINE_MATH_OPERATORS for C++ compatibility. - Enhanced editor integration tests with necessary includes for ImGui.
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
include(app/core/core.cmake)
|
||||
include(app/editor/editor.cmake)
|
||||
include(app/gfx/gfx.cmake)
|
||||
include(app/gui/gui.cmake)
|
||||
include(app/zelda3/zelda3.cmake)
|
||||
include(app/core/core_library.cmake)
|
||||
include(app/editor/editor_library.cmake)
|
||||
include(app/gfx/gfx_library.cmake)
|
||||
include(app/gui/gui_library.cmake)
|
||||
include(app/zelda3/zelda3_library.cmake)
|
||||
|
||||
if (APPLE)
|
||||
add_executable(
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
set(
|
||||
YAZE_APP_CORE_SRC
|
||||
app/core/controller.cc
|
||||
app/emu/emulator.cc
|
||||
app/core/project.cc
|
||||
app/core/window.cc
|
||||
app/core/asar_wrapper.cc
|
||||
app/core/widget_state_capture.cc
|
||||
)
|
||||
|
||||
if (WIN32 OR MINGW OR (UNIX AND NOT APPLE))
|
||||
list(APPEND YAZE_APP_CORE_SRC
|
||||
app/core/platform/font_loader.cc
|
||||
app/core/platform/file_dialog.cc
|
||||
)
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
list(APPEND YAZE_APP_CORE_SRC
|
||||
app/core/platform/file_dialog.cc
|
||||
app/core/platform/file_dialog.mm
|
||||
app/core/platform/app_delegate.mm
|
||||
app/core/platform/font_loader.cc
|
||||
app/core/platform/font_loader.mm
|
||||
)
|
||||
|
||||
find_library(COCOA_LIBRARY Cocoa)
|
||||
if(NOT COCOA_LIBRARY)
|
||||
message(FATAL_ERROR "Cocoa not found")
|
||||
endif()
|
||||
set(CMAKE_EXE_LINKER_FLAGS "-framework ServiceManagement -framework Foundation -framework Cocoa")
|
||||
endif()
|
||||
@@ -1,3 +1,36 @@
|
||||
set(
|
||||
YAZE_APP_CORE_SRC
|
||||
app/core/controller.cc
|
||||
app/emu/emulator.cc
|
||||
app/core/project.cc
|
||||
app/core/window.cc
|
||||
app/core/asar_wrapper.cc
|
||||
app/core/widget_state_capture.cc
|
||||
)
|
||||
|
||||
if (WIN32 OR MINGW OR (UNIX AND NOT APPLE))
|
||||
list(APPEND YAZE_APP_CORE_SRC
|
||||
app/core/platform/font_loader.cc
|
||||
app/core/platform/file_dialog.cc
|
||||
)
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
list(APPEND YAZE_APP_CORE_SRC
|
||||
app/core/platform/file_dialog.cc
|
||||
app/core/platform/file_dialog.mm
|
||||
app/core/platform/app_delegate.mm
|
||||
app/core/platform/font_loader.cc
|
||||
app/core/platform/font_loader.mm
|
||||
)
|
||||
|
||||
find_library(COCOA_LIBRARY Cocoa)
|
||||
if(NOT COCOA_LIBRARY)
|
||||
message(FATAL_ERROR "Cocoa not found")
|
||||
endif()
|
||||
set(CMAKE_EXE_LINKER_FLAGS "-framework ServiceManagement -framework Foundation -framework Cocoa")
|
||||
endif()
|
||||
|
||||
# ==============================================================================
|
||||
# Yaze Core Library
|
||||
# ==============================================================================
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
set(
|
||||
YAZE_APP_EDITOR_SRC
|
||||
app/editor/editor_manager.cc
|
||||
app/editor/dungeon/dungeon_editor.cc
|
||||
app/editor/dungeon/dungeon_editor_v2.cc
|
||||
app/editor/dungeon/dungeon_room_selector.cc
|
||||
app/editor/dungeon/dungeon_canvas_viewer.cc
|
||||
app/editor/dungeon/dungeon_object_selector.cc
|
||||
app/editor/dungeon/dungeon_toolset.cc
|
||||
app/editor/dungeon/dungeon_object_interaction.cc
|
||||
app/editor/dungeon/dungeon_renderer.cc
|
||||
app/editor/dungeon/dungeon_room_loader.cc
|
||||
app/editor/dungeon/dungeon_usage_tracker.cc
|
||||
app/editor/overworld/overworld_editor.cc
|
||||
app/editor/overworld/overworld_editor_manager.cc
|
||||
app/editor/overworld/scratch_space.cc
|
||||
app/editor/sprite/sprite_editor.cc
|
||||
app/editor/music/music_editor.cc
|
||||
app/editor/message/message_editor.cc
|
||||
app/editor/message/message_data.cc
|
||||
app/editor/message/message_preview.cc
|
||||
app/editor/code/assembly_editor.cc
|
||||
app/editor/graphics/screen_editor.cc
|
||||
app/editor/graphics/graphics_editor.cc
|
||||
app/editor/graphics/palette_editor.cc
|
||||
app/editor/overworld/tile16_editor.cc
|
||||
app/editor/overworld/map_properties.cc
|
||||
app/editor/graphics/gfx_group_editor.cc
|
||||
app/editor/overworld/entity.cc
|
||||
app/editor/system/settings_editor.cc
|
||||
app/editor/system/command_manager.cc
|
||||
app/editor/system/extension_manager.cc
|
||||
app/editor/system/shortcut_manager.cc
|
||||
app/editor/system/popup_manager.cc
|
||||
app/editor/system/agent_chat_history_codec.cc
|
||||
app/editor/system/proposal_drawer.cc
|
||||
)
|
||||
|
||||
if(YAZE_WITH_GRPC)
|
||||
list(APPEND YAZE_APP_EDITOR_SRC
|
||||
app/editor/system/agent_chat_widget.cc
|
||||
app/editor/system/agent_collaboration_coordinator.cc
|
||||
)
|
||||
endif()
|
||||
@@ -1,3 +1,48 @@
|
||||
set(
|
||||
YAZE_APP_EDITOR_SRC
|
||||
app/editor/editor_manager.cc
|
||||
app/editor/dungeon/dungeon_editor.cc
|
||||
app/editor/dungeon/dungeon_editor_v2.cc
|
||||
app/editor/dungeon/dungeon_room_selector.cc
|
||||
app/editor/dungeon/dungeon_canvas_viewer.cc
|
||||
app/editor/dungeon/dungeon_object_selector.cc
|
||||
app/editor/dungeon/dungeon_toolset.cc
|
||||
app/editor/dungeon/dungeon_object_interaction.cc
|
||||
app/editor/dungeon/dungeon_renderer.cc
|
||||
app/editor/dungeon/dungeon_room_loader.cc
|
||||
app/editor/dungeon/dungeon_usage_tracker.cc
|
||||
app/editor/overworld/overworld_editor.cc
|
||||
app/editor/overworld/overworld_editor_manager.cc
|
||||
app/editor/overworld/scratch_space.cc
|
||||
app/editor/sprite/sprite_editor.cc
|
||||
app/editor/music/music_editor.cc
|
||||
app/editor/message/message_editor.cc
|
||||
app/editor/message/message_data.cc
|
||||
app/editor/message/message_preview.cc
|
||||
app/editor/code/assembly_editor.cc
|
||||
app/editor/graphics/screen_editor.cc
|
||||
app/editor/graphics/graphics_editor.cc
|
||||
app/editor/graphics/palette_editor.cc
|
||||
app/editor/overworld/tile16_editor.cc
|
||||
app/editor/overworld/map_properties.cc
|
||||
app/editor/graphics/gfx_group_editor.cc
|
||||
app/editor/overworld/entity.cc
|
||||
app/editor/system/settings_editor.cc
|
||||
app/editor/system/command_manager.cc
|
||||
app/editor/system/extension_manager.cc
|
||||
app/editor/system/shortcut_manager.cc
|
||||
app/editor/system/popup_manager.cc
|
||||
app/editor/system/agent_chat_history_codec.cc
|
||||
app/editor/system/proposal_drawer.cc
|
||||
)
|
||||
|
||||
if(YAZE_WITH_GRPC)
|
||||
list(APPEND YAZE_APP_EDITOR_SRC
|
||||
app/editor/system/agent_chat_widget.cc
|
||||
app/editor/system/agent_collaboration_coordinator.cc
|
||||
)
|
||||
endif()
|
||||
|
||||
# ==============================================================================
|
||||
# Yaze Editor Library
|
||||
# ==============================================================================
|
||||
@@ -18,6 +63,15 @@
|
||||
|
||||
add_library(yaze_editor STATIC ${YAZE_APP_EDITOR_SRC})
|
||||
|
||||
target_precompile_headers(yaze_editor PRIVATE
|
||||
<array>
|
||||
<cstdint>
|
||||
<memory>
|
||||
<set>
|
||||
<string>
|
||||
<vector>
|
||||
)
|
||||
|
||||
target_include_directories(yaze_editor PUBLIC
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
${CMAKE_SOURCE_DIR}/src/lib
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
#include <chrono>
|
||||
#include <cstring>
|
||||
|
||||
#define IMGUI_DEFINE_MATH_OPERATORS
|
||||
|
||||
#include "absl/status/status.h"
|
||||
#include "absl/status/statusor.h"
|
||||
#include "absl/strings/match.h"
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
|
||||
#define IMGUI_DEFINE_MATH_OPERATORS
|
||||
|
||||
#include "imgui/imgui.h"
|
||||
|
||||
#include <deque>
|
||||
#include <vector>
|
||||
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
set(
|
||||
YAZE_APP_GFX_SRC
|
||||
app/gfx/arena.cc
|
||||
app/gfx/atlas_renderer.cc
|
||||
app/gfx/background_buffer.cc
|
||||
app/gfx/bitmap.cc
|
||||
app/gfx/compression.cc
|
||||
app/gfx/memory_pool.cc
|
||||
app/gfx/performance_dashboard.cc
|
||||
app/gfx/performance_profiler.cc
|
||||
app/gfx/scad_format.cc
|
||||
app/gfx/snes_palette.cc
|
||||
app/gfx/snes_tile.cc
|
||||
app/gfx/snes_color.cc
|
||||
app/gfx/tilemap.cc
|
||||
app/gfx/graphics_optimizer.cc
|
||||
app/gfx/bpp_format_manager.cc
|
||||
)
|
||||
@@ -1,3 +1,22 @@
|
||||
set(
|
||||
YAZE_APP_GFX_SRC
|
||||
app/gfx/arena.cc
|
||||
app/gfx/atlas_renderer.cc
|
||||
app/gfx/background_buffer.cc
|
||||
app/gfx/bitmap.cc
|
||||
app/gfx/compression.cc
|
||||
app/gfx/memory_pool.cc
|
||||
app/gfx/performance_dashboard.cc
|
||||
app/gfx/performance_profiler.cc
|
||||
app/gfx/scad_format.cc
|
||||
app/gfx/snes_palette.cc
|
||||
app/gfx/snes_tile.cc
|
||||
app/gfx/snes_color.cc
|
||||
app/gfx/tilemap.cc
|
||||
app/gfx/graphics_optimizer.cc
|
||||
app/gfx/bpp_format_manager.cc
|
||||
)
|
||||
|
||||
# ==============================================================================
|
||||
# Yaze Graphics Library
|
||||
# ==============================================================================
|
||||
@@ -14,6 +33,12 @@
|
||||
|
||||
add_library(yaze_gfx STATIC ${YAZE_APP_GFX_SRC})
|
||||
|
||||
target_precompile_headers(yaze_gfx PRIVATE
|
||||
<vector>
|
||||
<string>
|
||||
<memory>
|
||||
)
|
||||
|
||||
target_include_directories(yaze_gfx PUBLIC
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
${CMAKE_SOURCE_DIR}/src/lib
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
set(
|
||||
YAZE_GUI_SRC
|
||||
app/gui/modules/asset_browser.cc
|
||||
app/gui/modules/text_editor.cc
|
||||
app/gui/widgets/agent_chat_widget.cc
|
||||
app/gui/canvas.cc
|
||||
app/gui/canvas_utils.cc
|
||||
app/gui/enhanced_palette_editor.cc
|
||||
app/gui/input.cc
|
||||
app/gui/style.cc
|
||||
app/gui/color.cc
|
||||
app/gui/theme_manager.cc
|
||||
app/gui/background_renderer.cc
|
||||
app/gui/bpp_format_ui.cc
|
||||
app/gui/widget_id_registry.cc
|
||||
app/gui/widget_auto_register.cc
|
||||
# Canvas system components
|
||||
app/gui/canvas/canvas_modals.cc
|
||||
app/gui/canvas/canvas_context_menu.cc
|
||||
app/gui/canvas/canvas_usage_tracker.cc
|
||||
app/gui/canvas/canvas_performance_integration.cc
|
||||
app/gui/canvas/canvas_interaction_handler.cc
|
||||
)
|
||||
@@ -1,3 +1,27 @@
|
||||
set(
|
||||
YAZE_GUI_SRC
|
||||
app/gui/modules/asset_browser.cc
|
||||
app/gui/modules/text_editor.cc
|
||||
app/gui/widgets/agent_chat_widget.cc
|
||||
app/gui/canvas.cc
|
||||
app/gui/canvas_utils.cc
|
||||
app/gui/enhanced_palette_editor.cc
|
||||
app/gui/input.cc
|
||||
app/gui/style.cc
|
||||
app/gui/color.cc
|
||||
app/gui/theme_manager.cc
|
||||
app/gui/background_renderer.cc
|
||||
app/gui/bpp_format_ui.cc
|
||||
app/gui/widget_id_registry.cc
|
||||
app/gui/widget_auto_register.cc
|
||||
# Canvas system components
|
||||
app/gui/canvas/canvas_modals.cc
|
||||
app/gui/canvas/canvas_context_menu.cc
|
||||
app/gui/canvas/canvas_usage_tracker.cc
|
||||
app/gui/canvas/canvas_performance_integration.cc
|
||||
app/gui/canvas/canvas_interaction_handler.cc
|
||||
)
|
||||
|
||||
# ==============================================================================
|
||||
# Yaze GUI Library
|
||||
# ==============================================================================
|
||||
@@ -14,6 +38,15 @@
|
||||
|
||||
add_library(yaze_gui STATIC ${YAZE_GUI_SRC})
|
||||
|
||||
target_precompile_headers(yaze_gui PRIVATE
|
||||
<array>
|
||||
<memory>
|
||||
<set>
|
||||
<string>
|
||||
<string_view>
|
||||
<vector>
|
||||
)
|
||||
|
||||
target_include_directories(yaze_gui PUBLIC
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
${CMAKE_SOURCE_DIR}/src/lib
|
||||
|
||||
@@ -12,14 +12,20 @@
|
||||
|
||||
add_library(yaze_test_support STATIC app/test/test_manager.cc)
|
||||
|
||||
target_precompile_headers(yaze_test_support PRIVATE
|
||||
<memory>
|
||||
<set>
|
||||
<string>
|
||||
<string_view>
|
||||
<vector>
|
||||
)
|
||||
|
||||
target_include_directories(yaze_test_support PUBLIC
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
${CMAKE_SOURCE_DIR}/incl
|
||||
${PROJECT_BINARY_DIR}
|
||||
)
|
||||
|
||||
# The test support library needs to link against all the major app libraries
|
||||
# to be able to test them.
|
||||
target_link_libraries(yaze_test_support PUBLIC
|
||||
yaze_editor
|
||||
yaze_core_lib
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
set(
|
||||
YAZE_APP_ZELDA3_SRC
|
||||
app/zelda3/hyrule_magic.cc
|
||||
app/zelda3/zelda3_labels.cc
|
||||
app/zelda3/overworld/overworld_map.cc
|
||||
app/zelda3/overworld/overworld.cc
|
||||
app/zelda3/screen/inventory.cc
|
||||
app/zelda3/screen/title_screen.cc
|
||||
app/zelda3/screen/dungeon_map.cc
|
||||
app/zelda3/sprite/sprite.cc
|
||||
app/zelda3/sprite/sprite_builder.cc
|
||||
app/zelda3/music/tracker.cc
|
||||
app/zelda3/dungeon/room.cc
|
||||
app/zelda3/dungeon/room_object.cc
|
||||
app/zelda3/dungeon/object_parser.cc
|
||||
app/zelda3/dungeon/object_renderer.cc
|
||||
app/zelda3/dungeon/room_layout.cc
|
||||
app/zelda3/dungeon/room_diagnostic.cc
|
||||
app/zelda3/dungeon/room_visual_diagnostic.cc
|
||||
app/zelda3/dungeon/dungeon_editor_system.cc
|
||||
app/zelda3/dungeon/dungeon_object_editor.cc
|
||||
)
|
||||
@@ -1,3 +1,26 @@
|
||||
set(
|
||||
YAZE_APP_ZELDA3_SRC
|
||||
app/zelda3/hyrule_magic.cc
|
||||
app/zelda3/zelda3_labels.cc
|
||||
app/zelda3/overworld/overworld_map.cc
|
||||
app/zelda3/overworld/overworld.cc
|
||||
app/zelda3/screen/inventory.cc
|
||||
app/zelda3/screen/title_screen.cc
|
||||
app/zelda3/screen/dungeon_map.cc
|
||||
app/zelda3/sprite/sprite.cc
|
||||
app/zelda3/sprite/sprite_builder.cc
|
||||
app/zelda3/music/tracker.cc
|
||||
app/zelda3/dungeon/room.cc
|
||||
app/zelda3/dungeon/room_object.cc
|
||||
app/zelda3/dungeon/object_parser.cc
|
||||
app/zelda3/dungeon/object_renderer.cc
|
||||
app/zelda3/dungeon/room_layout.cc
|
||||
app/zelda3/dungeon/room_diagnostic.cc
|
||||
app/zelda3/dungeon/room_visual_diagnostic.cc
|
||||
app/zelda3/dungeon/dungeon_editor_system.cc
|
||||
app/zelda3/dungeon/dungeon_object_editor.cc
|
||||
)
|
||||
|
||||
# ==============================================================================
|
||||
# Yaze Zelda3 Library
|
||||
# ==============================================================================
|
||||
@@ -13,6 +36,15 @@
|
||||
|
||||
add_library(yaze_zelda3 STATIC ${YAZE_APP_ZELDA3_SRC})
|
||||
|
||||
target_precompile_headers(yaze_zelda3 PRIVATE
|
||||
<array>
|
||||
<memory>
|
||||
<set>
|
||||
<string>
|
||||
<string_view>
|
||||
<vector>
|
||||
)
|
||||
|
||||
target_include_directories(yaze_zelda3 PUBLIC
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
${CMAKE_SOURCE_DIR}/src/lib
|
||||
|
||||
Reference in New Issue
Block a user