mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-12-12 19:22:30 +00:00
feat(gx): add incomplete 'CGxDeviceGLSDL' (#2)
* chore(build): add vendored SDL 3.0.0 library * chore(build): add vendored glew-cmake-2.2.0 library * feat(console): in the presence of -opengl launch flag, change GxApi to OpenGl * feat(gx): add uncompleted CGxDeviceGLSDL targeting Windows and Linux * chore(build): change SDL3 linkage from shared (bad) to to static (good)
This commit is contained in:
parent
934e0fb600
commit
706c8903a1
2043 changed files with 663533 additions and 5 deletions
103
vendor/sdl-3.0.0/cmake/android/FindSdlAndroid.cmake
vendored
Normal file
103
vendor/sdl-3.0.0/cmake/android/FindSdlAndroid.cmake
vendored
Normal file
|
|
@ -0,0 +1,103 @@
|
|||
#[=======================================================================[
|
||||
|
||||
FindSdlAndroid
|
||||
----------------------
|
||||
|
||||
Locate various executables that are essential to creating an Android APK archive.
|
||||
This find module uses the FindSdlAndroidBuildTools module to locate some Android utils.
|
||||
|
||||
|
||||
Imported targets
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
This module defines the following :prop_tgt:`IMPORTED` target(s):
|
||||
|
||||
`` SdlAndroid::aapt2 ``
|
||||
Imported executable for the "android package tool" v2
|
||||
|
||||
`` SdlAndroid::apksigner``
|
||||
Imported executable for the APK signer tool
|
||||
|
||||
`` SdlAndroid::d8 ``
|
||||
Imported executable for the dex compiler
|
||||
|
||||
`` SdlAndroid::zipalign ``
|
||||
Imported executable for the zipalign util
|
||||
|
||||
`` SdlAndroid::adb ``
|
||||
Imported executable for the "android debug bridge" tool
|
||||
|
||||
`` SdlAndroid::keytool ``
|
||||
Imported executable for the keytool, a key and certificate management utility
|
||||
|
||||
`` SdlAndroid::zip ``
|
||||
Imported executable for the zip, for packaging and compressing files
|
||||
|
||||
Result variables
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
This module will set the following variables in your project:
|
||||
|
||||
`` AAPT2_BIN ``
|
||||
Path of aapt2
|
||||
|
||||
`` APKSIGNER_BIN ``
|
||||
Path of apksigner
|
||||
|
||||
`` D8_BIN ``
|
||||
Path of d8
|
||||
|
||||
`` ZIPALIGN_BIN ``
|
||||
Path of zipalign
|
||||
|
||||
`` ADB_BIN ``
|
||||
Path of adb
|
||||
|
||||
`` KEYTOOL_BIN ``
|
||||
Path of keytool
|
||||
|
||||
`` ZIP_BIN ``
|
||||
Path of zip
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
cmake_minimum_required(VERSION 3.7)
|
||||
|
||||
if(NOT PROJECT_NAME MATCHES "^SDL.*")
|
||||
message(WARNING "This module is internal to SDL and is currently not supported.")
|
||||
endif()
|
||||
|
||||
find_package(SdlAndroidBuildTools MODULE)
|
||||
|
||||
function(_sdl_android_find_create_imported_executable NAME)
|
||||
string(TOUPPER "${NAME}" NAME_UPPER)
|
||||
set(varname "${NAME_UPPER}_BIN")
|
||||
find_program("${varname}" NAMES "${NAME}" PATHS ${SDL_ANDROID_BUILD_TOOLS_ROOT})
|
||||
if(EXISTS "${${varname}}" AND NOT TARGET SdlAndroid::${NAME})
|
||||
add_executable(SdlAndroid::${NAME} IMPORTED)
|
||||
set_property(TARGET SdlAndroid::${NAME} PROPERTY IMPORTED_LOCATION "${${varname}}")
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
if(SdlAndroidBuildTools_FOUND)
|
||||
_sdl_android_find_create_imported_executable(aapt2)
|
||||
_sdl_android_find_create_imported_executable(apksigner)
|
||||
_sdl_android_find_create_imported_executable(d8)
|
||||
_sdl_android_find_create_imported_executable(zipalign)
|
||||
endif()
|
||||
|
||||
_sdl_android_find_create_imported_executable(adb)
|
||||
_sdl_android_find_create_imported_executable(keytool)
|
||||
_sdl_android_find_create_imported_executable(zip)
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package_handle_standard_args(SdlAndroid
|
||||
VERSION_VAR
|
||||
REQUIRED_VARS
|
||||
AAPT2_BIN
|
||||
APKSIGNER_BIN
|
||||
D8_BIN
|
||||
ZIPALIGN_BIN
|
||||
KEYTOOL_BIN
|
||||
ZIP_BIN
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue