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(
|
set(
|
||||||
ABSL_TARGETS
|
ABSL_TARGETS
|
||||||
absl::strings
|
absl::strings
|
||||||
|
absl::str_format
|
||||||
absl::flags
|
absl::flags
|
||||||
absl::status
|
absl::status
|
||||||
absl::statusor
|
absl::statusor
|
||||||
@@ -39,4 +40,7 @@ set(
|
|||||||
absl::flags_program_name
|
absl::flags_program_name
|
||||||
absl::flags_config
|
absl::flags_config
|
||||||
absl::flags_reflection
|
absl::flags_reflection
|
||||||
|
absl::container_memory
|
||||||
|
absl::memory
|
||||||
|
absl::utility
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,15 +1,16 @@
|
|||||||
# SDL2
|
# SDL2
|
||||||
if (UNIX OR MINGW)
|
if (UNIX OR MINGW)
|
||||||
add_subdirectory(src/lib/SDL)
|
add_subdirectory(src/lib/SDL)
|
||||||
|
# When using bundled SDL, use the static target
|
||||||
|
set(SDL_TARGETS SDL2-static)
|
||||||
else()
|
else()
|
||||||
find_package(SDL2)
|
find_package(SDL2)
|
||||||
endif()
|
# When using system SDL, use the imported targets
|
||||||
|
set(SDL_TARGETS SDL2::SDL2)
|
||||||
set(SDL_TARGETS SDL2::SDL2)
|
if(WIN32)
|
||||||
|
|
||||||
if(WIN32 OR MINGW)
|
|
||||||
list(PREPEND SDL_TARGETS SDL2::SDL2main ws2_32)
|
list(PREPEND SDL_TARGETS SDL2::SDL2main ws2_32)
|
||||||
add_definitions("-DSDL_MAIN_HANDLED")
|
add_definitions("-DSDL_MAIN_HANDLED")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# libpng and ZLIB dependencies
|
# libpng and ZLIB dependencies
|
||||||
|
|||||||
Reference in New Issue
Block a user