Enhance CMake configuration for Abseil and SDL2 dependencies

- Added new Abseil components: absl::str_format, absl::container_memory, absl::memory, and absl::utility to the CMake configuration for improved functionality.
- Updated SDL2 configuration to use static targets when bundled and adjusted the handling of system SDL to ensure proper target usage across platforms.
This commit is contained in:
scawful
2025-09-26 11:51:29 -04:00
parent 832d0b0cb7
commit 626dbbe0d7
2 changed files with 10 additions and 5 deletions

View File

@@ -18,6 +18,7 @@ set(ABSL_ENABLE_INSTALL ON)
set(
ABSL_TARGETS
absl::strings
absl::str_format
absl::flags
absl::status
absl::statusor
@@ -39,4 +40,7 @@ set(
absl::flags_program_name
absl::flags_config
absl::flags_reflection
absl::container_memory
absl::memory
absl::utility
)

View File

@@ -1,15 +1,16 @@
# SDL2
if (UNIX OR MINGW)
add_subdirectory(src/lib/SDL)
# When using bundled SDL, use the static target
set(SDL_TARGETS SDL2-static)
else()
find_package(SDL2)
endif()
set(SDL_TARGETS SDL2::SDL2)
if(WIN32 OR MINGW)
# When using system SDL, use the imported targets
set(SDL_TARGETS SDL2::SDL2)
if(WIN32)
list(PREPEND SDL_TARGETS SDL2::SDL2main ws2_32)
add_definitions("-DSDL_MAIN_HANDLED")
endif()
endif()
# libpng and ZLIB dependencies