-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Better explanation and display (cmake gui) of cache variables.
- Loading branch information
1 parent
ce69efa
commit fc64adb
Showing
11 changed files
with
99 additions
and
69 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
include(CMakeFindDependencyMacro) | ||
set(FILE_NAME_PREFIX @INSTALL_NAME@) | ||
if(ANDROID) | ||
find_dependency(${FILE_NAME_PREFIX}-android-${ANDROID_PLATFORM_LEVEL}-${ANDROID_SYSROOT_ABI}) | ||
endif(ANDROID) | ||
set(PREFIX @INSTALL_NAME@) | ||
if(ANDROID AND ANDROID_ARM_NEON) | ||
find_dependency(${PREFIX}-${ANDROID_PLATFORM}-${ANDROID_SYSROOT_ABI}-neon) | ||
elseif(ANDROID AND NOT ANDROID_ARM_NEON) | ||
find_dependency(${PREFIX}-${ANDROID_PLATFORM}-${ANDROID_SYSROOT_ABI}) | ||
endif() |
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,37 @@ | ||
set(ANDROID_NDK CACHE PATH | ||
"Path to Android NDK." | ||
) | ||
set(ANDROID_NATIVE_API_LEVEL CACHE STRING | ||
"Android API level to compile for. Acceptable values are: [0-9]+ or android-[0-9]+" | ||
) | ||
set(ANDROID_PLATFORM CACHE STRING | ||
"Alternative way to set Android API level. Acceptable values are: latest or android-[0-9]+" | ||
) | ||
set(ANDROID_ABI CACHE STRING | ||
"Target CPU of android device, like e.g. \"armeabi-v7a\"." | ||
) | ||
set_property(CACHE ANDROID_ABI PROPERTY STRINGS | ||
"armeabi-v7a" | ||
"armeabi-v7a with neon" | ||
"arm64-v8a" | ||
"x86" | ||
"x86_64" | ||
) | ||
if(NOT "${ANDROID_NDK}" STREQUAL "") | ||
set(ANDROID ON) | ||
endif() | ||
if(ANDROID AND NOT EXISTS "${ANDROID_NDK}") | ||
message(FATAL_ERROR "Path: ${ANDROID_NDK} does not exist.") | ||
endif() | ||
if(ANDROID AND "${ANDROID_TOOLCHAIN_FILE}" STREQUAL "") | ||
set(ANDROID_TOOLCHAIN_FILE "${ANDROID_NDK}/build/cmake/android.toolchain.cmake" | ||
CACHE INTERNAL | ||
"Android toolchain file." | ||
) | ||
endif() | ||
if(ANDROID AND NOT EXISTS "${ANDROID_TOOLCHAIN_FILE}") | ||
message(FATAL_ERROR | ||
"Could not find file: ${ANDROID_TOOLCHAIN_FILE}. " | ||
"Your NDK might be outdated." | ||
) | ||
endif() |
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,13 @@ | ||
|
||
set(ANDROID_NATIVE_API_LEVEL ${ANDROID_NATIVE_API_LEVEL} CACHE STRING | ||
"Android API level to compile for. Acceptable values are: [0-9]+ or android-[0-9]+" | ||
FORCE | ||
) | ||
set(ANDROID_PLATFORM ${ANDROID_PLATFORM} CACHE STRING | ||
"Alternative way to set Android API level. Acceptable values are: latest or android-[0-9]+" | ||
FORCE | ||
) | ||
set(ANDROID_ABI ${ANDROID_ABI} CACHE STRING | ||
"Target CPU of android device, like e.g. \"armeabi-v7a\"." | ||
FORCE | ||
) |
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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
include(CMakeFindDependencyMacro) | ||
set(FILE_NAME_PREFIX @INSTALL_NAME@) | ||
if(ANDROID) | ||
find_dependency(${FILE_NAME_PREFIX}-android-${ANDROID_PLATFORM_LEVEL}-${ANDROID_SYSROOT_ABI}) | ||
endif(ANDROID) | ||
set(PREFIX @INSTALL_NAME@) | ||
if(ANDROID AND ANDROID_ARM_NEON) | ||
find_dependency(${PREFIX}-${ANDROID_PLATFORM}-${ANDROID_SYSROOT_ABI}-neon) | ||
elseif(ANDROID AND NOT ANDROID_ARM_NEON) | ||
find_dependency(${PREFIX}-${ANDROID_PLATFORM}-${ANDROID_SYSROOT_ABI}) | ||
endif() |
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