- 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.
48 lines
1.4 KiB
CMake
48 lines
1.4 KiB
CMake
# ==============================================================================
|
|
# Yaze Utility Library
|
|
# ==============================================================================
|
|
# This library contains low-level utilities used throughout the codebase:
|
|
# - BPS patch handling
|
|
# - Command-line flag parsing
|
|
# - Hexadecimal utilities
|
|
#
|
|
# This library has no dependencies on GUI, graphics, or game-specific code,
|
|
# making it the foundation of the dependency hierarchy.
|
|
# ==============================================================================
|
|
|
|
set(YAZE_UTIL_SRC
|
|
util/bps.cc
|
|
util/flag.cc
|
|
util/hex.cc
|
|
)
|
|
|
|
add_library(yaze_util STATIC ${YAZE_UTIL_SRC})
|
|
|
|
target_include_directories(yaze_util PUBLIC
|
|
${CMAKE_SOURCE_DIR}/src
|
|
${CMAKE_SOURCE_DIR}/incl
|
|
${PROJECT_BINARY_DIR}
|
|
)
|
|
|
|
target_link_libraries(yaze_util PUBLIC
|
|
yaze_common
|
|
${ABSL_TARGETS}
|
|
)
|
|
|
|
set_target_properties(yaze_util 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_util PRIVATE linux stricmp=strcasecmp)
|
|
elseif(APPLE)
|
|
target_compile_definitions(yaze_util PRIVATE MACOS)
|
|
elseif(WIN32)
|
|
target_compile_definitions(yaze_util PRIVATE WINDOWS)
|
|
endif()
|
|
|
|
message(STATUS "✓ yaze_util library configured")
|