summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--CMakeLists.txt37
-rw-r--r--src/android/app/build.gradle.kts2
2 files changed, 1 insertions, 38 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2bef9d6ed..1049a4cd8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -11,7 +11,6 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/externals/cmake-modul
11include(DownloadExternals) 11include(DownloadExternals)
12include(CMakeDependentOption) 12include(CMakeDependentOption)
13include(CTest) 13include(CTest)
14include(FetchContent)
15 14
16# Set bundled sdl2/qt as dependent options. 15# Set bundled sdl2/qt as dependent options.
17# OFF by default, but if ENABLE_SDL2 and MSVC are true then ON 16# OFF by default, but if ENABLE_SDL2 and MSVC are true then ON
@@ -99,47 +98,11 @@ if (ANDROID AND YUZU_DOWNLOAD_ANDROID_VVL)
99 DESTINATION "${vvl_lib_path}") 98 DESTINATION "${vvl_lib_path}")
100endif() 99endif()
101 100
102# On Android, fetch and compile libcxx before doing anything else
103if (ANDROID) 101if (ANDROID)
104 set(CMAKE_SKIP_INSTALL_RULES ON) 102 set(CMAKE_SKIP_INSTALL_RULES ON)
105 set(LLVM_VERSION "15.0.6")
106
107 # Note: even though libcxx and libcxxabi have separate releases on the project page,
108 # the separated releases cannot be compiled. Only in-tree builds work. Therefore we
109 # must fetch the source release for the entire llvm tree.
110 FetchContent_Declare(llvm
111 URL "https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_VERSION}/llvm-project-${LLVM_VERSION}.src.tar.xz"
112 URL_HASH SHA256=9d53ad04dc60cb7b30e810faf64c5ab8157dadef46c8766f67f286238256ff92
113 TLS_VERIFY TRUE
114 )
115 FetchContent_MakeAvailable(llvm)
116
117 # libcxx has support for most of the range library, but it's gated behind a flag:
118 add_compile_definitions(_LIBCPP_ENABLE_EXPERIMENTAL)
119 103
120 # Disable standard header inclusion 104 # Disable standard header inclusion
121 set(ANDROID_STL "none") 105 set(ANDROID_STL "none")
122
123 # libcxxabi
124 set(LIBCXXABI_INCLUDE_TESTS OFF)
125 set(LIBCXXABI_ENABLE_SHARED FALSE)
126 set(LIBCXXABI_ENABLE_STATIC TRUE)
127 set(LIBCXXABI_LIBCXX_INCLUDES "${LIBCXX_TARGET_INCLUDE_DIRECTORY}" CACHE STRING "" FORCE)
128 add_subdirectory("${llvm_SOURCE_DIR}/libcxxabi" "${llvm_BINARY_DIR}/libcxxabi")
129 link_libraries(cxxabi_static)
130
131 # libcxx
132 set(LIBCXX_ABI_NAMESPACE "__ndk1" CACHE STRING "" FORCE)
133 set(LIBCXX_CXX_ABI "libcxxabi")
134 set(LIBCXX_INCLUDE_TESTS OFF)
135 set(LIBCXX_INCLUDE_BENCHMARKS OFF)
136 set(LIBCXX_INCLUDE_DOCS OFF)
137 set(LIBCXX_ENABLE_SHARED FALSE)
138 set(LIBCXX_ENABLE_STATIC TRUE)
139 set(LIBCXX_ENABLE_ASSERTIONS FALSE)
140 add_subdirectory("${llvm_SOURCE_DIR}/libcxx" "${llvm_BINARY_DIR}/libcxx")
141 set_target_properties(cxx-headers PROPERTIES INTERFACE_COMPILE_OPTIONS "-isystem${CMAKE_BINARY_DIR}/${LIBCXX_INSTALL_INCLUDE_DIR}")
142 link_libraries(cxx_static cxx-headers)
143endif() 106endif()
144 107
145if (YUZU_USE_BUNDLED_VCPKG) 108if (YUZU_USE_BUNDLED_VCPKG)
diff --git a/src/android/app/build.gradle.kts b/src/android/app/build.gradle.kts
index 84a3308b7..b100862b2 100644
--- a/src/android/app/build.gradle.kts
+++ b/src/android/app/build.gradle.kts
@@ -27,7 +27,7 @@ android {
27 namespace = "org.yuzu.yuzu_emu" 27 namespace = "org.yuzu.yuzu_emu"
28 28
29 compileSdkVersion = "android-34" 29 compileSdkVersion = "android-34"
30 ndkVersion = "25.2.9519653" 30 ndkVersion = "26.1.10909125"
31 31
32 buildFeatures { 32 buildFeatures {
33 viewBinding = true 33 viewBinding = true