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:
@@ -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