looper/cmake/built_sdl/SDL3Config.cmake

43 lines
1.5 KiB
CMake
Raw Normal View History

2024-11-20 08:15:45 -08:00
# sdl2 cmake project-config input for CMakeLists.txt script
include(FeatureSummary)
set_package_properties(SDL3 PROPERTIES
URL "https://www.libsdl.org/"
DESCRIPTION "low level access to audio, keyboard, mouse, joystick, and graphics hardware"
)
########################################################################
set(SDL3_FOUND TRUE CACHE INTERNAL "")
set(SDL3_SDL3_FOUND TRUE CACHE INTERNAL "")
set(SDL3_SDL3-static_FOUND TRUE CACHE INTERNAL "")
set(SDL3_SDL3test_FOUND OFF CACHE INTERNAL "")
# Find SDL3::Headers
if(NOT TARGET SDL3::Headers)
add_library(SDL3::Headers ALIAS SDL3_Headers)
endif()
set(SDL3_Headers_FOUND TRUE)
if (NOT DEFINED SDL3_FOUND)
if (SDL2::SDL3main)
set(SDL3_SDL3main_FOUND ON)
else()
set(SDL3_SDL3main_FOUND OFF)
endif()
set(SDL3_LIBRARY SDL3::SDL3 CACHE INTERNAL "")
set(SDL3_INCLUDE_DIR CACHE INTERNAL "")
set(SDL3_LIBRARIES SDL3::SDL3 CACHE INTERNAL "")
set(SDL3_STATIC_LIBRARIES SDL3::SDL3 CACHE INTERNAL "")
set(SDL3_STATIC_PRIVATE_LIBS "" CACHE INTERNAL "")
set(SDL3_INCLUDE_DIRS "" CACHE INTERNAL "")
#get_target_property(SDL2_STATIC_PRIVATE_LIBS SDL2-static LINK_LIBRARIES)
get_target_property(_SDL3_INCLUDE_DIRS SDL3::Headers INCLUDE_DIRECTORIES)
set(SDL3_INCLUDE_DIRS ${_SDL3_INCLUDE_DIRS} CACHE INTERNAL "")
unset(_SDL3_INCLUDE_DIRS)
if(SDL3_SDL3main_FOUND)
set(SDL3MAIN_LIBRARY SDL3::SDL3main CACHE INTERNAL "")
else()
set(SDL3MAIN_LIBRARY CACHE INTERNAL "")
endif()
endif()