mirror of
https://git.sr.ht/~thestr4ng3r/chiaki
synced 2025-08-21 14:03:11 -07:00
Add Nintendo Switch chiaki-lib support (#233)
This commit is contained in:
parent
6d02714d0e
commit
f35311bf61
19 changed files with 771 additions and 20 deletions
|
@ -7,7 +7,9 @@ option(CHIAKI_ENABLE_TESTS "Enable tests for Chiaki" ON)
|
|||
option(CHIAKI_ENABLE_CLI "Enable CLI for Chiaki" OFF)
|
||||
option(CHIAKI_ENABLE_GUI "Enable Qt GUI" ON)
|
||||
option(CHIAKI_ENABLE_ANDROID "Enable Android (Use only as part of the Gradle Project)" OFF)
|
||||
option(CHIAKI_ENABLE_SWITCH "Enable Nintendo Switch (Requires devKitPro libnx)" OFF)
|
||||
option(CHIAKI_LIB_ENABLE_OPUS "Use Opus as part of Chiaki Lib" ON)
|
||||
option(CHIAKI_LIB_ENABLE_MBEDTLS "Use mbedtls instead of OpenSSL as part of Chiaki Lib" OFF)
|
||||
option(CHIAKI_LIB_OPENSSL_EXTERNAL_PROJECT "Use OpenSSL as CMake external project" OFF)
|
||||
option(CHIAKI_GUI_ENABLE_QT_GAMEPAD "Use QtGamepad for Input" OFF)
|
||||
option(CHIAKI_GUI_ENABLE_SDL_GAMECONTROLLER "Use SDL Gamecontroller for Input" ON)
|
||||
|
@ -30,6 +32,22 @@ include(CPack)
|
|||
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
||||
|
||||
# configure nintendo switch toolchain
|
||||
if(CHIAKI_ENABLE_SWITCH AND CHIAKI_ENABLE_SWITCH_LINUX)
|
||||
# CHIAKI_ENABLE_SWITCH_LINUX is a special testing version
|
||||
# the aim is to troubleshoot nitendo switch chiaki verison
|
||||
# from a x86 linux os
|
||||
add_definitions(-DCHIAKI_ENABLE_SWITCH_LINUX)
|
||||
set(CMAKE_BUILD_TYPE Debug)
|
||||
elseif(CHIAKI_ENABLE_SWITCH)
|
||||
add_definitions(-D__SWITCH__)
|
||||
# load switch.cmake toolchain form ./cmake folder
|
||||
include(switch)
|
||||
# TODO check if android ... or other versions are enabled
|
||||
# force mbedtls as crypto lib
|
||||
set(CHIAKI_LIB_ENABLE_MBEDTLS ON)
|
||||
endif()
|
||||
|
||||
add_subdirectory(third-party)
|
||||
|
||||
add_definitions(-DCHIAKI_VERSION_MAJOR=${CHIAKI_VERSION_MAJOR} -DCHIAKI_VERSION_MINOR=${CHIAKI_VERSION_MINOR} -DCHIAKI_VERSION_PATCH=${CHIAKI_VERSION_PATCH} -DCHIAKI_VERSION=\"${CHIAKI_VERSION}\")
|
||||
|
@ -38,6 +56,10 @@ if(CHIAKI_LIB_OPENSSL_EXTERNAL_PROJECT)
|
|||
include(OpenSSLExternalProject)
|
||||
endif()
|
||||
|
||||
if(CHIAKI_LIB_ENABLE_MBEDTLS)
|
||||
add_definitions(-DCHIAKI_LIB_ENABLE_MBEDTLS)
|
||||
endif()
|
||||
|
||||
add_subdirectory(lib)
|
||||
|
||||
if(CHIAKI_ENABLE_CLI)
|
||||
|
@ -56,3 +78,8 @@ endif()
|
|||
if(CHIAKI_ENABLE_ANDROID)
|
||||
add_subdirectory(android/app)
|
||||
endif()
|
||||
|
||||
if(CHIAKI_ENABLE_SWITCH)
|
||||
#TODO
|
||||
#add_subdirectory(switch)
|
||||
endif()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue