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:
@@ -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
|
||||
)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user