Use CMake 3.24.0+ for Android (#3065)

This commit is contained in:
Bart Louwers
2024-12-03 23:30:08 +01:00
committed by GitHub
parent c548212d42
commit 5c8dd71243
3 changed files with 11 additions and 3 deletions

View File

@@ -146,6 +146,14 @@ target_include_directories(
${PROJECT_SOURCE_DIR}/src
)
# this is needed because Android is not officially supported
# https://discourse.cmake.org/t/error-when-crosscompiling-with-whole-archive-target-link/9394
# https://cmake.org/cmake/help/latest/release/3.24.html#generator-expressions
set(CMAKE_LINK_LIBRARY_USING_WHOLE_ARCHIVE
"-Wl,--whole-archive <LIBRARY> -Wl,--no-whole-archive"
)
set(CMAKE_LINK_LIBRARY_USING_WHOLE_ARCHIVE_SUPPORTED True)
find_package(curl CONFIG)
target_link_libraries(

View File

@@ -1,4 +1,4 @@
object Versions {
const val ndkVersion ="27.0.12077973"
const val cmakeVersion = "3.18.1+"
const val ndkVersion = "27.0.12077973"
const val cmakeVersion = "3.24.0+"
}

View File

@@ -47,7 +47,7 @@ android {
externalNativeBuild {
cmake {
version = "3.18.1+"
version = "3.24.0+"
path = file("../../../CMakeLists.txt")
}
}