1
1
# documentation: https://d.android.com/studio/projects/add-native-code.html
2
2
3
3
# 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)
5
5
6
6
project (NativeScriptAndroidRuntime)
7
7
@@ -18,13 +18,14 @@ endif (CCACHE_FOUND AND (USE_CCACHE))
18
18
# "-DANDROID_STL=c++_static" is just not enough for clang++ to find some libraries in the ndk
19
19
MESSAGE (STATUS "## ANDROID_NDK_ROOT: " ${ANDROID_NDK_ROOT} )
20
20
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" )
22
22
23
23
if ("${ANDROID_ABI} " MATCHES "arm64-v8a$" OR "${ANDROID_ABI} " MATCHES "x86_64$" )
24
24
# Enable pointer compression on 64 bit platforms
25
25
set (COMMON_CMAKE_ARGUMENTS "${COMMON_CMAKE_ARGUMENTS} -DV8_COMPRESS_POINTERS" )
26
26
endif ()
27
27
28
+
28
29
# AOSP has switched to using LLD by default and the NDK will use it by default in the next release.
29
30
# BFD and Gold will be removed once LLD has been through a release cycle with no major unresolved issues (estimated r21)
30
31
# Note: lld does not currently work on Windows: https://github.com/android-ndk/ndk/issues/888
@@ -142,6 +143,7 @@ add_library(
142
143
src/main/cpp/ada/ada.cpp
143
144
src/main/cpp/URLImpl.cpp
144
145
src/main/cpp/URLSearchParamsImpl.cpp
146
+ src/main/cpp/URLPatternImpl.cpp
145
147
146
148
# V8 inspector source files will be included only in Release mode
147
149
${INSPECTOR_SOURCES}
@@ -163,6 +165,7 @@ else ()
163
165
)
164
166
endif ()
165
167
168
+
166
169
MESSAGE (STATUS "# General cmake Info" )
167
170
MESSAGE (STATUS "# PROJECT_SOURCE_DIR: " ${PROJECT_SOURCE_DIR} )
168
171
MESSAGE (STATUS "# CMAKE_VERSION: " ${CMAKE_VERSION} )
@@ -183,11 +186,6 @@ if("${ANDROID_ABI}" MATCHES "armeabi-v7a$" OR "${ANDROID_ABI}" MATCHES "x86$")
183
186
target_link_libraries (NativeScript ${ANDROID_NDK_ROOT} /sources /cxx-stl/llvm-libc++/libs/${ANDROID_ABI} /libandroid_support.a)
184
187
endif ()
185
188
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
-
191
189
# Command info: https://cmake.org/cmake/help/v3.4/command/find_library.html
192
190
# Searches for a specified prebuilt library and stores the path as a
193
191
# variable. Because CMake includes system libraries in the search path by
0 commit comments