mirror of
https://github.com/shadps4-emu/ext-SDL.git
synced 2024-12-03 00:06:20 +00:00
66 lines
2.2 KiB
CMake
66 lines
2.2 KiB
CMake
# SDL 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"
|
|
)
|
|
|
|
@PACKAGE_INIT@
|
|
|
|
set(SDL3_FOUND TRUE)
|
|
|
|
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL3Targets.cmake")
|
|
include("${CMAKE_CURRENT_LIST_DIR}/SDL3Targets.cmake")
|
|
set(SDL3_SDL3_FOUND TRUE)
|
|
endif()
|
|
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL3staticTargets.cmake")
|
|
if(ANDROID)
|
|
enable_language(CXX)
|
|
endif()
|
|
include("${CMAKE_CURRENT_LIST_DIR}/SDL3staticTargets.cmake")
|
|
set(SDL3_SDL3-static_FOUND TRUE)
|
|
endif()
|
|
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL3mainTargets.cmake")
|
|
include("${CMAKE_CURRENT_LIST_DIR}/SDL3mainTargets.cmake")
|
|
set(SDL3_SDL3_main_FOUND TRUE)
|
|
endif()
|
|
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL3testTargets.cmake")
|
|
include("${CMAKE_CURRENT_LIST_DIR}/SDL3testTargets.cmake")
|
|
set(SDL3_SDL3_test_FOUND TRUE)
|
|
endif()
|
|
|
|
check_required_components(SDL3)
|
|
|
|
# Create SDL3::SDL3 alias for static-only builds
|
|
if(TARGET SDL3::SDL3-static AND NOT TARGET SDL3::SDL3)
|
|
if(CMAKE_VERSION VERSION_LESS "3.18")
|
|
# FIXME: Aliasing local targets is not supported on CMake < 3.18, so make it global.
|
|
add_library(SDL3::SDL3 INTERFACE IMPORTED)
|
|
set_target_properties(SDL3::SDL3 PROPERTIES INTERFACE_LINK_LIBRARIES "SDL3::SDL3-static")
|
|
else()
|
|
add_library(SDL3::SDL3 ALIAS SDL3::SDL3-static)
|
|
endif()
|
|
endif()
|
|
|
|
# For compatibility with autotools sdl3-config.cmake, provide SDL3_* variables.
|
|
|
|
set(SDL3_PREFIX "@PACKAGE_CMAKE_INSTALL_PREFIX@")
|
|
set(SDL3_EXEC_PREFIX "@PACKAGE_CMAKE_INSTALL_PREFIX@")
|
|
set(SDL3_INCLUDE_DIR "@PACKAGE_CMAKE_INSTALL_FULL_INCLUDEDIR@")
|
|
set(SDL3_INCLUDE_DIRS "${SDL3_INCLUDE_DIR}")
|
|
set(SDL3_BINDIR "@PACKAGE_CMAKE_INSTALL_FULL_BINDIR@")
|
|
set(SDL3_LIBDIR "@PACKAGE_CMAKE_INSTALL_FULL_LIBDIR@")
|
|
set(SDL3_LIBRARIES SDL3::SDL3)
|
|
set(SDL3_STATIC_LIBRARIES SDL3::SDL3-static)
|
|
set(SDL3_STATIC_PRIVATE_LIBS)
|
|
|
|
set(SDL3MAIN_LIBRARY)
|
|
if(TARGET SDL3::SDL3_main)
|
|
set(SDL3MAIN_LIBRARY SDL3::SDL3_main)
|
|
list(INSERT SDL3_LIBRARIES 0 SDL3::SDL3_main)
|
|
list(INSERT SDL3_STATIC_LIBRARIES 0 SDL3::SDL3_main)
|
|
endif()
|
|
|
|
set(SDL3TEST_LIBRARY SDL3::SDL3_test)
|