File tree Expand file tree Collapse file tree 17 files changed +154
-118
lines changed
bitmap-plasma/app/src/main/cpp
texture-view/src/main/cpp
endless-tunnel/app/src/main/cpp
gles3jni/app/src/main/cpp
hello-gl2/app/src/main/cpp
hello-jniCallback/app/src/main/cpp
hello-libs/app/src/main/cpp
hello-neon/app/src/main/cpp
native-activity/app/src/main/cpp
native-audio/app/src/main/cpp
native-media/app/src/main/cpp
native-plasma/app/src/main/cpp
san-angeles/app/src/main/cpp
sensor-graph/accelerometer/src/main/cpp Expand file tree Collapse file tree 17 files changed +154
-118
lines changed Original file line number Diff line number Diff line change 11cmake_minimum_required (VERSION 3.22.1)
2+ project (BitmapPlasma LANGUAGES C)
23
34set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror -Wno-unused-function" )
45
5- add_library (plasma SHARED
6- plasma.c)
6+ add_library (plasma SHARED plasma.c)
77
88# Include libraries needed for plasma lib
99target_link_libraries (plasma
10- android
11- jnigraphics
12- log
13- m)
10+ android
11+ jnigraphics
12+ log
13+ m
14+ )
Original file line number Diff line number Diff line change 1515#
1616
1717cmake_minimum_required (VERSION 3.22.1)
18+ project (CameraBasic LANGUAGES C CXX)
1819
1920set (CMAKE_VERBOSE_MAKEFILE on )
2021set (COMMON_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} /../../../../common)
Original file line number Diff line number Diff line change 1515#
1616
1717cmake_minimum_required (VERSION 3.22.1)
18+ project (CameraTextureView LANGUAGES CXX)
1819
1920set (CMAKE_VERBOSE_MAKEFILE on )
2021set (COMMON_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} /../../../../common)
Original file line number Diff line number Diff line change 1515#
1616
1717cmake_minimum_required (VERSION 3.22.1)
18+ project (EndlessTunnel LANGUAGES C CXX)
1819
1920# build native_app_glue as a static lib
2021add_library (native_app_glue STATIC
21- ${ANDROID_NDK} /sources /android/native_app_glue/android_native_app_glue.c)
22+ ${ANDROID_NDK} /sources /android/native_app_glue/android_native_app_glue.c
23+ )
2224
2325# Export ANativeActivity_onCreate(),
2426# Refer to: https://github.com/android-ndk/ndk/issues/381.
@@ -34,43 +36,46 @@ add_subdirectory(glm)
3436
3537# now build app's shared lib
3638add_library (game SHARED
37- android_main.cpp
38- anim.cpp
39- ascii_to_geom.cpp
40- dialog_scene.cpp
41- indexbuf.cpp
42- input_util.cpp
43- jni_util.cpp
44- native_engine.cpp
45- obstacle.cpp
46- obstacle_generator.cpp
47- our_shader.cpp
48- play_scene.cpp
49- scene.cpp
50- scene_manager.cpp
51- sfxman.cpp
52- shader.cpp
53- shape_renderer.cpp
54- tex_quad.cpp
55- text_renderer.cpp
56- texture.cpp
57- ui_scene.cpp
58- util.cpp
59- vertexbuf.cpp
60- welcome_scene.cpp)
39+ android_main.cpp
40+ anim.cpp
41+ ascii_to_geom.cpp
42+ dialog_scene.cpp
43+ indexbuf.cpp
44+ input_util.cpp
45+ jni_util.cpp
46+ native_engine.cpp
47+ obstacle.cpp
48+ obstacle_generator.cpp
49+ our_shader.cpp
50+ play_scene.cpp
51+ scene.cpp
52+ scene_manager.cpp
53+ sfxman.cpp
54+ shader.cpp
55+ shape_renderer.cpp
56+ tex_quad.cpp
57+ text_renderer.cpp
58+ texture.cpp
59+ ui_scene.cpp
60+ util.cpp
61+ vertexbuf.cpp
62+ welcome_scene.cpp
63+ )
6164
6265target_include_directories (game PRIVATE
63- ${CMAKE_CURRENT_SOURCE_DIR}
64- ${CMAKE_CURRENT_SOURCE_DIR} /data
65- ${ANDROID_NDK} /sources /android/native_app_glue)
66+ ${CMAKE_CURRENT_SOURCE_DIR}
67+ ${CMAKE_CURRENT_SOURCE_DIR} /data
68+ ${ANDROID_NDK} /sources /android/native_app_glue
69+ )
6670
6771# add lib dependencies
6872target_link_libraries (game
69- android
70- native_app_glue
71- atomic
72- EGL
73- GLESv2
74- glm
75- log
76- OpenSLES)
73+ android
74+ native_app_glue
75+ atomic
76+ EGL
77+ GLESv2
78+ glm
79+ log
80+ OpenSLES
81+ )
Original file line number Diff line number Diff line change 11cmake_minimum_required (VERSION 3.22.1)
2+ project (Gles3Jni LANGUAGES C CXX)
3+
24# set targetPlatform, will be passed in from gradle when this sample is completed
35# openGL Supportability
46# platform status
@@ -22,27 +24,29 @@ cmake_minimum_required(VERSION 3.22.1)
2224set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall" )
2325set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti -fno-exceptions -Wall" )
2426if (${ANDROID_PLATFORM_LEVEL} LESS 12)
25- message (FATAL_ERROR "OpenGL 2 is not supported before API level 11 \
27+ message (FATAL_ERROR "OpenGL 2 is not supported before API level 11 \
2628 (currently using ${ANDROID_PLATFORM_LEVEL} )." )
27- return ()
29+ return ()
2830elseif (${ANDROID_PLATFORM_LEVEL} LESS 18)
29- add_definitions ("-DDYNAMIC_ES3" )
30- set (GL3STUB_SRC gl3stub.c)
31- set (OPENGL_LIB GLESv2)
31+ add_definitions ("-DDYNAMIC_ES3" )
32+ set (GL3STUB_SRC gl3stub.c)
33+ set (OPENGL_LIB GLESv2)
3234else ()
33- set (OPENGL_LIB GLESv3)
35+ set (OPENGL_LIB GLESv3)
3436endif (${ANDROID_PLATFORM_LEVEL} LESS 12)
3537
3638add_library (gles3jni SHARED
37- ${GL3STUB_SRC}
38- gles3jni.cpp
39- RendererES2.cpp
40- RendererES3.cpp)
39+ ${GL3STUB_SRC}
40+ gles3jni.cpp
41+ RendererES2.cpp
42+ RendererES3.cpp
43+ )
4144
4245# Include libraries needed for gles3jni lib
4346target_link_libraries (gles3jni
44- ${OPENGL_LIB}
45- android
46- EGL
47- log
48- m)
47+ ${OPENGL_LIB}
48+ android
49+ EGL
50+ log
51+ m
52+ )
Original file line number Diff line number Diff line change 11cmake_minimum_required (VERSION 3.22.1)
2+ project (HelloGl2 LANGUAGES CXX)
23
34# now build app's shared lib
45set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall" )
56
6- add_library (gl2jni SHARED
7- gl_code.cpp)
7+ add_library (gl2jni SHARED gl_code.cpp)
88
99# add lib dependencies
1010target_link_libraries (gl2jni
11- android
12- log
13- EGL
14- GLESv2)
11+ android
12+ log
13+ EGL
14+ GLESv2
15+ )
1516
Original file line number Diff line number Diff line change 11cmake_minimum_required (VERSION 3.22.1)
2+ project (HelloJniCallback LANGUAGES C)
23
3- add_library (hello-jnicallback SHARED
4- hello-jnicallback.c)
4+ add_library (hello-jnicallback SHARED hello-jnicallback.c)
55
66# Include libraries needed for hello-jnicallback lib
77target_link_libraries (hello-jnicallback
8- android
9- log )
8+ android
9+ log
10+ )
Original file line number Diff line number Diff line change 1616#
1717
1818cmake_minimum_required (VERSION 3.22.1)
19+ project (HelloLibs LANGUAGES CXX)
1920
2021# configure import libs
2122set (distribution_DIR ${CMAKE_CURRENT_SOURCE_DIR} /../../../../distribution)
@@ -34,14 +35,17 @@ set_target_properties(lib_gperf PROPERTIES IMPORTED_LOCATION
3435set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} " )
3536
3637add_library (hello-libs SHARED
37- hello-libs.cpp)
38+ hello-libs.cpp
39+ )
3840
3941target_include_directories (hello-libs PRIVATE
40- ${distribution_DIR} /gmath/include
41- ${distribution_DIR} /gperf/include )
42+ ${distribution_DIR} /gmath/include
43+ ${distribution_DIR} /gperf/include
44+ )
4245
4346target_link_libraries (hello-libs
44- android
45- lib_gmath
46- lib_gperf
47- log )
47+ android
48+ lib_gmath
49+ lib_gperf
50+ log
51+ )
Original file line number Diff line number Diff line change 11cmake_minimum_required (VERSION 3.22.1)
2+ project (HelloNeon LANGUAGES C)
23
34# build cpufeatures as a static lib
45add_library (cpufeatures STATIC
5- ${ANDROID_NDK} /sources /android/cpufeatures/cpu-features.c)
6+ ${ANDROID_NDK} /sources /android/cpufeatures/cpu-features.c
7+ )
68
79# build app's shared lib
810
@@ -13,12 +15,12 @@ add_library(cpufeatures STATIC
1315# [This example only build for armeabi-v7a, x86 could be done the same way]
1416#
1517if (${ANDROID_ABI} STREQUAL "armeabi-v7a" )
16- # make a list of neon files and add neon compiling flags to them
17- set (neon_SRCS helloneon-intrinsics.c)
18+ # make a list of neon files and add neon compiling flags to them
19+ set (neon_SRCS helloneon-intrinsics.c)
1820
19- set_property (SOURCE ${neon_SRCS}
20- APPEND_STRING PROPERTY COMPILE_FLAGS " -mfpu=neon" )
21- add_definitions ("-DHAVE_NEON=1" )
21+ set_property (SOURCE ${neon_SRCS}
22+ APPEND_STRING PROPERTY COMPILE_FLAGS " -mfpu=neon" )
23+ add_definitions ("-DHAVE_NEON=1" )
2224elseif (${ANDROID_ABI} STREQUAL "x86" )
2325 set (neon_SRCS helloneon-intrinsics.c)
2426 set_property (SOURCE ${neon_SRCS} APPEND_STRING PROPERTY COMPILE_FLAGS
Original file line number Diff line number Diff line change 1515#
1616
1717cmake_minimum_required (VERSION 3.22.1)
18+ project (NativeActivity LANGUAGES C CXX)
1819
1920# build native_app_glue as a static lib
2021set (${CMAKE_C_FLAGS} , "${CMAKE_C_FLAGS} " )
You can’t perform that action at this time.
0 commit comments