mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
Android: Add clang --target= flag to compiler predefines command
When we set `CMAKE_<LANG>_COMPILER_TARGET` to the Android target architecture, add it to `CMAKE_<LANG>_COMPILER_PREDEFINES_COMMAND` also. This is needed to make moc predefines aware of `__ANDROID__`. Fixes: #18425
This commit is contained in:
@@ -40,5 +40,6 @@ macro(__android_compiler_clang lang)
|
|||||||
endif()
|
endif()
|
||||||
if(NOT CMAKE_${lang}_COMPILER_TARGET)
|
if(NOT CMAKE_${lang}_COMPILER_TARGET)
|
||||||
set(CMAKE_${lang}_COMPILER_TARGET "${_ANDROID_ABI_CLANG_TARGET}")
|
set(CMAKE_${lang}_COMPILER_TARGET "${_ANDROID_ABI_CLANG_TARGET}")
|
||||||
|
list(APPEND CMAKE_${lang}_COMPILER_PREDEFINES_COMMAND "--target=${CMAKE_${lang}_COMPILER_TARGET}")
|
||||||
endif()
|
endif()
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|||||||
Reference in New Issue
Block a user