11# documentation: https://d.android.com/studio/projects/add-native-code.html
22
33# Command info: https://cmake.org/cmake/help/v3.4/command/cmake_minimum_required.html
4- cmake_minimum_required (VERSION 3.4 .1)
4+ cmake_minimum_required (VERSION 3.18 .1)
55
66project (NativeScriptAndroidRuntime)
77
@@ -18,13 +18,14 @@ endif (CCACHE_FOUND AND (USE_CCACHE))
1818# "-DANDROID_STL=c++_static" is just not enough for clang++ to find some libraries in the ndk
1919MESSAGE (STATUS "## ANDROID_NDK_ROOT: " ${ANDROID_NDK_ROOT} )
2020
21- set (COMMON_CMAKE_ARGUMENTS "-std=c++17 -Werror -Wno-unused-result -mstackrealign -fexceptions -fno-builtin-stpcpy -fno-rtti -DV8_31BIT_SMIS_ON_64BIT_ARCH -DV8_31BIT_SMIS_ON_64BIT_ARCH -DV8_ENABLE_REGEXP_INTERPRETER_THREADED_DISPATCH -DV8_EMBEDDED_BUILTINS" )
21+ set (COMMON_CMAKE_ARGUMENTS "-std=c++20 -Werror -Wno-vla-cxx-extension -Wno-unused-result -mstackrealign -fexceptions -fno-builtin-stpcpy -fno-rtti -DV8_31BIT_SMIS_ON_64BIT_ARCH -DV8_31BIT_SMIS_ON_64BIT_ARCH -DV8_ENABLE_REGEXP_INTERPRETER_THREADED_DISPATCH -DV8_EMBEDDED_BUILTINS" )
2222
2323if ("${ANDROID_ABI} " MATCHES "arm64-v8a$" OR "${ANDROID_ABI} " MATCHES "x86_64$" )
2424 # Enable pointer compression on 64 bit platforms
2525 set (COMMON_CMAKE_ARGUMENTS "${COMMON_CMAKE_ARGUMENTS} -DV8_COMPRESS_POINTERS" )
2626endif ()
2727
28+
2829# AOSP has switched to using LLD by default and the NDK will use it by default in the next release.
2930# BFD and Gold will be removed once LLD has been through a release cycle with no major unresolved issues (estimated r21)
3031# Note: lld does not currently work on Windows: https://github.com/android-ndk/ndk/issues/888
@@ -142,6 +143,7 @@ add_library(
142143 src/main/cpp/ada/ada.cpp
143144 src/main/cpp/URLImpl.cpp
144145 src/main/cpp/URLSearchParamsImpl.cpp
146+ src/main/cpp/URLPatternImpl.cpp
145147
146148 # V8 inspector source files will be included only in Release mode
147149 ${INSPECTOR_SOURCES}
@@ -163,6 +165,7 @@ else ()
163165 )
164166endif ()
165167
168+
166169MESSAGE (STATUS "# General cmake Info" )
167170MESSAGE (STATUS "# PROJECT_SOURCE_DIR: " ${PROJECT_SOURCE_DIR} )
168171MESSAGE (STATUS "# CMAKE_VERSION: " ${CMAKE_VERSION} )
@@ -183,11 +186,6 @@ if("${ANDROID_ABI}" MATCHES "armeabi-v7a$" OR "${ANDROID_ABI}" MATCHES "x86$")
183186 target_link_libraries (NativeScript ${ANDROID_NDK_ROOT} /sources /cxx-stl/llvm-libc++/libs/${ANDROID_ABI} /libandroid_support.a)
184187endif ()
185188
186-
187- if ("${ANDROID_ABI} " MATCHES "arm64-v8a$" OR "${ANDROID_ABI} " MATCHES "x86_64$" )
188- target_link_options (NativeScript PRIVATE "-Wl,-z,max-page-size=16384" )
189- endif ()
190-
191189# Command info: https://cmake.org/cmake/help/v3.4/command/find_library.html
192190# Searches for a specified prebuilt library and stores the path as a
193191# variable. Because CMake includes system libraries in the search path by
0 commit comments