Enhance CMake configuration for PNG support and introduce vcpkg.json

- Updated CMakeLists.txt to conditionally enable PNG support based on the presence of the PNG library, improving compatibility for minimal builds.
- Added vcpkg.json to manage project dependencies, including zlib, libpng, sdl2, and abseil, streamlining package management.
- Modified CI workflow in ci.yml to simplify CMake configuration commands for better readability.
- Enhanced CMake scripts to ensure proper handling of dependencies in both minimal and regular builds, improving build reliability.
This commit is contained in:
scawful
2025-09-25 09:56:32 -04:00
parent 163aa9e121
commit d26f58be2f
8 changed files with 72 additions and 19 deletions

View File

@@ -26,8 +26,13 @@ option(YAZE_ENABLE_EXPERIMENTAL_TESTS "Enable experimental/unstable tests" ON)
option(YAZE_MINIMAL_BUILD "Minimal build for CI (disable optional features)" OFF)
set(YAZE_TEST_ROM_PATH "${CMAKE_BINARY_DIR}/bin/zelda3.sfc" CACHE STRING "Path to test ROM file")
# libpng features in bitmap.cc
add_definitions("-DYAZE_LIB_PNG=1")
# libpng features in bitmap.cc - conditional for minimal builds
if(PNG_FOUND)
add_definitions("-DYAZE_LIB_PNG=1")
else()
add_definitions("-DYAZE_LIB_PNG=0")
message(STATUS "Building without PNG support for minimal build")
endif()
# Modern CMake standards
set(CMAKE_CXX_STANDARD 23)