Skip to content

Commit

Permalink
Update CMake behaviors.
Browse files Browse the repository at this point in the history
The version here is like Android's targetSdkVersion: it controls bug
compatibility sorts of things. Bump it up to the CMake version we're
using so we get the modern behaviors.
  • Loading branch information
DanAlbert committed May 9, 2024
1 parent 2afdced commit 0febeef
Show file tree
Hide file tree
Showing 40 changed files with 40 additions and 40 deletions.
2 changes: 1 addition & 1 deletion audio-echo/app/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.4.1)
cmake_minimum_required(VERSION 3.22.1)
project(echo LANGUAGES C CXX)

add_library(echo
Expand Down
2 changes: 1 addition & 1 deletion bitmap-plasma/app/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.4.1)
cmake_minimum_required(VERSION 3.22.1)

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror -Wno-unused-function")

Expand Down
2 changes: 1 addition & 1 deletion camera/basic/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# limitations under the License.
#

cmake_minimum_required(VERSION 3.4.1)
cmake_minimum_required(VERSION 3.22.1)

set(CMAKE_VERBOSE_MAKEFILE on)
set(COMMON_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../../common)
Expand Down
2 changes: 1 addition & 1 deletion camera/texture-view/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# limitations under the License.
#

cmake_minimum_required(VERSION 3.4.1)
cmake_minimum_required(VERSION 3.22.1)

set(CMAKE_VERBOSE_MAKEFILE on)
set(COMMON_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../../common)
Expand Down
2 changes: 1 addition & 1 deletion display-p3/image-view/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# limitations under the License.
#

cmake_minimum_required(VERSION 3.4.1)
cmake_minimum_required(VERSION 3.22.1)

get_filename_component(THIRD_PARTY_LIB_DIR
${CMAKE_CURRENT_SOURCE_DIR}/../../../../third_party
Expand Down
2 changes: 1 addition & 1 deletion endless-tunnel/app/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# limitations under the License.
#

cmake_minimum_required(VERSION 3.4.1)
cmake_minimum_required(VERSION 3.22.1)

# build native_app_glue as a static lib
add_library(native_app_glue STATIC
Expand Down
2 changes: 1 addition & 1 deletion exceptions/app/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# Sets the minimum version of CMake required to build the native library.

cmake_minimum_required(VERSION 3.18.1)
cmake_minimum_required(VERSION 3.22.1)

# Declares and names the project.

Expand Down
2 changes: 1 addition & 1 deletion gles3jni/app/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.4.1)
cmake_minimum_required(VERSION 3.22.1)
# set targetPlatform, will be passed in from gradle when this sample is completed
# openGL Supportability
# platform status
Expand Down
2 changes: 1 addition & 1 deletion hello-gl2/app/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.4.1)
cmake_minimum_required(VERSION 3.22.1)

# now build app's shared lib
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall")
Expand Down
2 changes: 1 addition & 1 deletion hello-jni/app/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.18.1)
cmake_minimum_required(VERSION 3.22.1)

project("hello-jni")

Expand Down
2 changes: 1 addition & 1 deletion hello-jniCallback/app/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.4.1)
cmake_minimum_required(VERSION 3.22.1)

add_library(hello-jnicallback SHARED
hello-jnicallback.c)
Expand Down
2 changes: 1 addition & 1 deletion hello-libs/app/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# limitations under the License.
#

cmake_minimum_required(VERSION 3.4.1)
cmake_minimum_required(VERSION 3.22.1)

# configure import libs
set(distribution_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../../distribution)
Expand Down
2 changes: 1 addition & 1 deletion hello-libs/gen-libs/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# Generate one static lib and one shared lib, copy them into
# ${project_dir}/distribution for other indepdendent applications
# to use.
cmake_minimum_required(VERSION 3.4.1)
cmake_minimum_required(VERSION 3.22.1)

set(CMAKE_VERBOSE_MAKEFILE on)

Expand Down
2 changes: 1 addition & 1 deletion hello-libs/gen-libs/src/main/cpp/gmath/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# we could not delete the bin directory is because android studio would error out
# when it checks target's existance. Only distribution place is used as import to app

cmake_minimum_required(VERSION 3.4.1)
cmake_minimum_required(VERSION 3.22.1)

set(CMAKE_VERBOSE_MAKEFILE on)

Expand Down
2 changes: 1 addition & 1 deletion hello-libs/gen-libs/src/main/cpp/gperf/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# remove it after build complete, so only the distribution place could be
# used for application linking.

cmake_minimum_required(VERSION 3.4.1)
cmake_minimum_required(VERSION 3.22.1)

set(CMAKE_VERBOSE_MAKEFILE on)

Expand Down
2 changes: 1 addition & 1 deletion hello-neon/app/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.4.1)
cmake_minimum_required(VERSION 3.22.1)

# build cpufeatures as a static lib
add_library(cpufeatures STATIC
Expand Down
2 changes: 1 addition & 1 deletion hello-oboe/app/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
cmake_minimum_required(VERSION 3.4.1)
cmake_minimum_required(VERSION 3.22.1)
project(hello-oboe LANGUAGES CXX)

# add oboe pre-release lib hosted at https://maven.google.com/web/index.html
Expand Down
2 changes: 1 addition & 1 deletion hello-vulkan/app/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
limitations under the License.
#]]

cmake_minimum_required(VERSION 3.18.1)
cmake_minimum_required(VERSION 3.22.1)
project(hellovkjni)

# Include the GameActivity static lib to the project.
Expand Down
2 changes: 1 addition & 1 deletion native-activity/app/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# limitations under the License.
#

cmake_minimum_required(VERSION 3.4.1)
cmake_minimum_required(VERSION 3.22.1)

# build native_app_glue as a static lib
set(${CMAKE_C_FLAGS}, "${CMAKE_C_FLAGS}")
Expand Down
2 changes: 1 addition & 1 deletion native-audio/app/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.4.1)
cmake_minimum_required(VERSION 3.22.1)

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -Wall")

Expand Down
2 changes: 1 addition & 1 deletion native-codec/app/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.4.1)
cmake_minimum_required(VERSION 3.22.1)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -UNDEBUG")

Expand Down
2 changes: 1 addition & 1 deletion native-media/app/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.4.1)
cmake_minimum_required(VERSION 3.22.1)

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -UNDEBUG")

Expand Down
2 changes: 1 addition & 1 deletion native-midi/app/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.4.1)
cmake_minimum_required(VERSION 3.22.1)
project(native_midi LANGUAGES C CXX)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wextra -Werror -O0")
Expand Down
2 changes: 1 addition & 1 deletion native-plasma/app/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# limitations under the License.
#

cmake_minimum_required(VERSION 3.4.1)
cmake_minimum_required(VERSION 3.22.1)

# build native_app_glue as a static lib
add_library(native_app_glue STATIC
Expand Down
2 changes: 1 addition & 1 deletion nn-samples/basic/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.4.1)
cmake_minimum_required(VERSION 3.22.1)

add_library(basic
SHARED
Expand Down
2 changes: 1 addition & 1 deletion nn-samples/sequence/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.4.1)
cmake_minimum_required(VERSION 3.22.1)

add_library(sequence
SHARED
Expand Down
2 changes: 1 addition & 1 deletion prefab/curl-ssl/app/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# limitations under the License.
#

cmake_minimum_required(VERSION 3.6)
cmake_minimum_required(VERSION 3.22.1)
project(app VERSION 1.0.0 LANGUAGES CXX)

find_package(curl REQUIRED CONFIG)
Expand Down
2 changes: 1 addition & 1 deletion prefab/prefab-dependency/app/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# limitations under the License.
#

cmake_minimum_required(VERSION 3.6)
cmake_minimum_required(VERSION 3.22.1)
project(app VERSION 1.0.0 LANGUAGES CXX)

find_package(jsoncpp REQUIRED CONFIG)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# limitations under the License.
#

cmake_minimum_required(VERSION 3.6)
cmake_minimum_required(VERSION 3.22.1)
project(mylibrary VERSION 1.0.0 LANGUAGES CXX)

add_library(mylibrary SHARED mylibrary.cpp)
Expand Down
2 changes: 1 addition & 1 deletion san-angeles/app/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.4.1)
cmake_minimum_required(VERSION 3.22.1)

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror")
add_definitions("-DANDROID_NDK -DDISABLE_IMPORTGL")
Expand Down
2 changes: 1 addition & 1 deletion sanitizers/app/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# Sets the minimum version of CMake required to build the native library.

cmake_minimum_required(VERSION 3.18.1)
cmake_minimum_required(VERSION 3.22.1)

# Declares and names the project.

Expand Down
2 changes: 1 addition & 1 deletion sensor-graph/accelerometer/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.4.1)
cmake_minimum_required(VERSION 3.22.1)

# TODO: Remove -Wno-unused-variable
# That warning is ignore for now because those are release config only issues
Expand Down
2 changes: 1 addition & 1 deletion teapots/choreographer-30fps/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# limitations under the License.
#

cmake_minimum_required(VERSION 3.4.1)
cmake_minimum_required(VERSION 3.22.1)
project(ChoreographerNativeActivity LANGUAGES C CXX)

# set up common compile options
Expand Down
2 changes: 1 addition & 1 deletion teapots/classic-teapot/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# limitations under the License.
#

cmake_minimum_required(VERSION 3.4.1)
cmake_minimum_required(VERSION 3.22.1)
project(TeapotNativeActivity LANGUAGES C CXX)

# set up common compile options
Expand Down
2 changes: 1 addition & 1 deletion teapots/common/ndk_helper/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# build native_app_glue as a static lib
cmake_minimum_required(VERSION 3.4.1)
cmake_minimum_required(VERSION 3.22.1)

include(AndroidNdkModules)
android_ndk_import_module_native_app_glue()
Expand Down
2 changes: 1 addition & 1 deletion teapots/image-decoder/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# limitations under the License.
#

cmake_minimum_required(VERSION 3.4.1)
cmake_minimum_required(VERSION 3.22.1)
project(ImageDecoderNativeActivity LANGUAGES C CXX)

# set up common compile options
Expand Down
2 changes: 1 addition & 1 deletion teapots/more-teapots/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# limitations under the License.
#

cmake_minimum_required(VERSION 3.4.1)
cmake_minimum_required(VERSION 3.22.1)
project(MoreTeapotsNativeActivity LANGUAGES C CXX)

# set up common compile options
Expand Down
2 changes: 1 addition & 1 deletion teapots/textured-teapot/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# limitations under the License.
#

cmake_minimum_required(VERSION 3.4.1)
cmake_minimum_required(VERSION 3.22.1)
project(TexturedTeapotNativeActivity LANGUAGES C CXX)

# set up common compile options
Expand Down
2 changes: 1 addition & 1 deletion unit-test/app/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# Sets the minimum version of CMake required to build the native library.

cmake_minimum_required(VERSION 3.18.1)
cmake_minimum_required(VERSION 3.22.1)

# Declares and names the project.

Expand Down
2 changes: 1 addition & 1 deletion webp/view/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# limitations under the License.
#

cmake_minimum_required(VERSION 3.4.1)
cmake_minimum_required(VERSION 3.22.1)

set(CMAKE_VERBOSE_MAKEFILE on)

Expand Down

0 comments on commit 0febeef

Please sign in to comment.