Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android extra flags not applied on initial CMake generation #3117

Merged
merged 1 commit into from
Nov 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions util/test/demos/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,6 @@ if(BUILD_ANDROID)
set(ANDROID_ABI "arm64-v8a" CACHE STRING "The Android ABI to build for")

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DANDROID=1")

# The version of fmt used will not build due to std::char_traits support of non-std types being
# deprecated in the version of LLVM used by NDK v26
if(NOT "${ANDROID_NDK_VERSION}" VERSION_LESS "26.0.0")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations")
endif()
endif()

set(PROJECT demos)
Expand Down Expand Up @@ -311,6 +305,12 @@ if(APPLE)
elseif(BUILD_ANDROID)
target_compile_definitions(demos PRIVATE -DVK_USE_PLATFORM_ANDROID_KHR=1)
list(APPEND LIBS PRIVATE -llog -landroid -lEGL)

# The version of fmt used will not build due to std::char_traits support of non-std types being
# deprecated in the version of LLVM used by NDK v26
if(NOT "${ANDROID_NDK_VERSION}" VERSION_LESS "26.0.0")
target_compile_options(demos PRIVATE -Wno-deprecated-declarations)
endif()
elseif(UNIX)
target_compile_definitions(demos PRIVATE -DVK_USE_PLATFORM_XCB_KHR=1)
set(LIBS -lX11 -lxcb -lX11-xcb)
Expand Down