Skip to content

Commit

Permalink
Really stop downgrading C++.
Browse files Browse the repository at this point in the history
  • Loading branch information
DanAlbert committed May 14, 2024
1 parent 1464143 commit a752703
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 24 deletions.
1 change: 0 additions & 1 deletion prefab/curl-ssl/app/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,5 @@ find_package(curl REQUIRED CONFIG)
find_package(jsoncpp REQUIRED CONFIG)

add_library(app SHARED app.cpp http.cpp logging.cpp)
set_target_properties(app PROPERTIES CXX_STANDARD 17)
target_compile_options(app PRIVATE -Wall -Werror)
target_link_libraries(app ${LIBLOG} curl::curl jsoncpp::jsoncpp)
1 change: 0 additions & 1 deletion prefab/prefab-dependency/app/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,5 @@ project(app VERSION 1.0.0 LANGUAGES CXX)
find_package(jsoncpp REQUIRED CONFIG)

add_library(app SHARED app.cpp logging.cpp)
set_target_properties(app PROPERTIES CXX_STANDARD 17)
target_compile_options(app PRIVATE -Wall -Werror)
target_link_libraries(app jsoncpp::jsoncpp)
Binary file not shown.
7 changes: 0 additions & 7 deletions teapots/choreographer-30fps/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,6 @@ add_library(${PROJECT_NAME}
TeapotRenderer.cpp
)

set_target_properties(${PROJECT_NAME}
PROPERTIES
CXX_STANDARD 11
CXX_STANDARD_REQUIRED YES
CXX_EXTENSIONS NO
)

# Export ANativeActivity_onCreate(),
# Refer to: https://github.com/android-ndk/ndk/issues/381.
set_target_properties(${PROJECT_NAME}
Expand Down
6 changes: 0 additions & 6 deletions teapots/classic-teapot/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@ add_library(${PROJECT_NAME}
TeapotNativeActivity.cpp
TeapotRenderer.cpp
)
set_target_properties(${PROJECT_NAME}
PROPERTIES
CXX_STANDARD 11
CXX_STANDARD_REQUIRED YES
CXX_EXTENSIONS NO
)

# Export ANativeActivity_onCreate(),
# Refer to: https://github.com/android-ndk/ndk/issues/381.
Expand Down
13 changes: 10 additions & 3 deletions teapots/common/ndk_helper/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,25 @@ add_library(NdkHelper
tapCamera.cpp
vecmath.cpp
)
# TODO: Remove this
# This does not do what it looks like it does. It looks like it's redundant with
# the target_include_directories(... PUBLIC ...) below. What it's actually doing
# is re-exporting the headers for every library linked below. This is how all
# the teapots samples are getting their native_app_glue. They should depend on
# it explicitly.
set_target_properties(NdkHelper
PROPERTIES
CXX_STANDARD 11
CXX_STANDARD_REQUIRED YES
CXX_EXTENSIONS NO
INTERFACE_INCLUDE_DIRECTORIES $<TARGET_PROPERTY:NdkHelper,INCLUDE_DIRECTORIES>
)
target_include_directories(NdkHelper
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
)

# TODO: Audit, make private.
# Some of these are here because it was a common location to link the
# dependenices of the various teapot samples. Those samples should link their
# dependencies explicitly.
target_link_libraries(NdkHelper
PUBLIC
native_app_glue
Expand Down
6 changes: 0 additions & 6 deletions teapots/textured-teapot/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,6 @@ add_library(${PROJECT_NAME}
Texture.cpp
AssetUtil.cpp
)
set_target_properties(${PROJECT_NAME}
PROPERTIES
CXX_STANDARD 11
CXX_STANDARD_REQUIRED YES
CXX_EXTENSIONS NO
)
target_include_directories(${PROJECT_NAME} PRIVATE ${commonDir})

target_compile_options(${PROJECT_NAME} PRIVATE -Wno-unused-function)
Expand Down

1 comment on commit a752703

@yehia996
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you

Please sign in to comment.