Skip to content

Commit

Permalink
Use CMake 3.24.0+ for Android (#3065)
Browse files Browse the repository at this point in the history
  • Loading branch information
louwers authored Dec 3, 2024
1 parent c548212 commit 5c8dd71
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
8 changes: 8 additions & 0 deletions platform/android/android.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
4 changes: 2 additions & 2 deletions platform/android/buildSrc/src/main/kotlin/Versions.kt
Original file line number Diff line number Diff line change
@@ -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+"
}
2 changes: 1 addition & 1 deletion test/android/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ android {

externalNativeBuild {
cmake {
version = "3.18.1+"
version = "3.24.0+"
path = file("../../../CMakeLists.txt")
}
}
Expand Down

0 comments on commit 5c8dd71

Please sign in to comment.