feat: Implement modular build system for Yaze
- Added option to enable modular build with `YAZE_USE_MODULAR_BUILD`. - Updated CMake configuration to support modular libraries for core, editor, graphics, GUI, and emulator functionalities. - Refactored existing libraries to separate concerns and improve build times. - Introduced new utility library `yaze_util` for low-level utilities. - Adjusted CI and release workflows to accommodate the new build system. - Updated various source files to reflect new include paths and modular structure. - Enhanced YAML configuration handling in the agent component.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#ifndef YAZE_GUI_CANVAS_H
|
||||
#define YAZE_GUI_CANVAS_H
|
||||
|
||||
#include "gfx/tilemap.h"
|
||||
#include "app/gfx/tilemap.h"
|
||||
#define IMGUI_DEFINE_MATH_OPERATORS
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "app/gui/enhanced_palette_editor.h"
|
||||
#include "app/gui/bpp_format_ui.h"
|
||||
#include "app/gui/icons.h"
|
||||
#include "gui/canvas/canvas_modals.h"
|
||||
#include "app/gui/canvas/canvas_modals.h"
|
||||
#include "imgui/imgui.h"
|
||||
|
||||
namespace yaze {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "app/gfx/bitmap.h"
|
||||
#include "app/gfx/snes_palette.h"
|
||||
#include "app/gui/icons.h"
|
||||
#include "gui/canvas/canvas_modals.h"
|
||||
#include "app/gui/canvas/canvas_modals.h"
|
||||
#include "canvas_usage_tracker.h"
|
||||
#include "imgui/imgui.h"
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "app/gfx/bitmap.h"
|
||||
#include "app/gfx/snes_palette.h"
|
||||
#include "app/gfx/bpp_format_manager.h"
|
||||
#include "gui/canvas_utils.h"
|
||||
#include "app/gui/canvas_utils.h"
|
||||
#include "imgui/imgui.h"
|
||||
|
||||
namespace yaze {
|
||||
|
||||
49
src/app/gui/gui_library.cmake
Normal file
49
src/app/gui/gui_library.cmake
Normal file
@@ -0,0 +1,49 @@
|
||||
# ==============================================================================
|
||||
# Yaze GUI Library
|
||||
# ==============================================================================
|
||||
# This library contains all GUI-related functionality:
|
||||
# - Canvas system
|
||||
# - ImGui widgets and utilities
|
||||
# - Input handling
|
||||
# - Theme management
|
||||
# - Color utilities
|
||||
# - Background rendering
|
||||
#
|
||||
# Dependencies: yaze_gfx, yaze_util, ImGui, SDL2
|
||||
# ==============================================================================
|
||||
|
||||
add_library(yaze_gui STATIC ${YAZE_GUI_SRC})
|
||||
|
||||
target_include_directories(yaze_gui PUBLIC
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
${CMAKE_SOURCE_DIR}/src/lib
|
||||
${CMAKE_SOURCE_DIR}/src/lib/imgui
|
||||
${CMAKE_SOURCE_DIR}/incl
|
||||
${SDL2_INCLUDE_DIR}
|
||||
${PROJECT_BINARY_DIR}
|
||||
)
|
||||
|
||||
target_link_libraries(yaze_gui PUBLIC
|
||||
yaze_gfx
|
||||
yaze_util
|
||||
yaze_common
|
||||
ImGui
|
||||
${SDL_TARGETS}
|
||||
)
|
||||
|
||||
set_target_properties(yaze_gui PROPERTIES
|
||||
POSITION_INDEPENDENT_CODE ON
|
||||
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
|
||||
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
|
||||
)
|
||||
|
||||
# Platform-specific compile definitions
|
||||
if(UNIX AND NOT APPLE)
|
||||
target_compile_definitions(yaze_gui PRIVATE linux stricmp=strcasecmp)
|
||||
elseif(APPLE)
|
||||
target_compile_definitions(yaze_gui PRIVATE MACOS)
|
||||
elseif(WIN32)
|
||||
target_compile_definitions(yaze_gui PRIVATE WINDOWS)
|
||||
endif()
|
||||
|
||||
message(STATUS "✓ yaze_gui library configured")
|
||||
@@ -12,7 +12,7 @@
|
||||
#include <unordered_set>
|
||||
#include <vector>
|
||||
|
||||
#include "imgui.h"
|
||||
#include "imgui/imgui.h"
|
||||
|
||||
class TextEditor {
|
||||
public:
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
#include "app/core/platform/file_dialog.h"
|
||||
#include "app/gui/theme_manager.h"
|
||||
#include "app/gui/background_renderer.h"
|
||||
#include "core/platform/font_loader.h"
|
||||
#include "gui/color.h"
|
||||
#include "gui/icons.h"
|
||||
#include "app/core/platform/font_loader.h"
|
||||
#include "app/gui/color.h"
|
||||
#include "app/gui/icons.h"
|
||||
#include "imgui/imgui.h"
|
||||
#include "imgui/imgui_internal.h"
|
||||
#include "util/log.h"
|
||||
|
||||
Reference in New Issue
Block a user