-
Notifications
You must be signed in to change notification settings - Fork 391
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
176 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# toolchain file for android targets, see #1110 | ||
|
||
set(CMAKE_SYSTEM_NAME Android) | ||
set(CMAKE_SYSTEM_PROCESSOR "$ENV{CROSS_ANDROID_ARCH}") | ||
set(CMAKE_ANDROID_STANDALONE_TOOLCHAIN /android-ndk) | ||
set(CMAKE_ANDROID_API "$ENV{CROSS_ANDROID_SDK}") | ||
|
||
# not all of these are standard, however, they're common enough | ||
# that it's good practice to define them. | ||
set(prefix "$ENV{CROSS_ANDROID_TARGET}") | ||
set(CMAKE_C_COMPILER "/android-ndk/bin/${prefix}-gcc") | ||
set(CMAKE_ASM_COMPILER "/android-ndk/bin/${prefix}-gcc") | ||
set(CMAKE_CXX_COMPILER "/android-ndk/bin/${prefix}-g++") | ||
set(CMAKE_AR "/android-ndk/bin/${prefix}-ar") | ||
set(CMAKE_LINKER "/android-ndk/bin/${prefix}-ld") | ||
set(CMAKE_NM "/android-ndk/bin/${prefix}-nm") | ||
set(CMAKE_OBJCOPY "/android-ndk/bin/${prefix}-objcopy") | ||
set(CMAKE_OBJDUMP "/android-ndk/bin/${prefix}-objdump") | ||
set(CMAKE_RANLIB "/android-ndk/bin/${prefix}-ranlib") | ||
set(CMAKE_STRIP "/android-ndk/bin/${prefix}-strip") | ||
|
||
# required because otherwise it tries to detect compiler features | ||
# from `/android-ndk/bin/clang`, which fails. these macros are | ||
# technically deprecated, but required for proper function | ||
include(CMakeForceCompiler) | ||
set(CMAKE_WARN_DEPRECATED FALSE) | ||
CMAKE_FORCE_C_COMPILER("${CMAKE_C_COMPILER}" GNU) | ||
CMAKE_FORCE_CXX_COMPILER("${CMAKE_CXX_COMPILER}" GNU) |