Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
05ece243
Commit
05ece243
authored
May 06, 2011
by
Andrey Kamaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed Android API level detection for toolchain build
parent
a685be3e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
android.toolchain.cmake
android/android.toolchain.cmake
+4
-3
No files found.
android/android.toolchain.cmake
View file @
05ece243
...
...
@@ -101,7 +101,8 @@ set( ANDROID_NDK_DEFAULT_SEARCH_PATH /opt/android-ndk-r5b )
set
(
ANDROID_NDK_TOOLCHAIN_DEFAULT_SEARCH_PATH /opt/android-toolchain
)
set
(
TOOL_OS_SUFFIX
""
)
macro
(
__TOOLCHAIN_DETECT_API_LEVEL _path _expected
)
macro
(
__TOOLCHAIN_DETECT_API_LEVEL _path
)
SET
(
_expected
${
ARGV1
}
)
if
(
NOT EXISTS
${
_path
}
)
message
(
FATAL_ERROR
"Could not verify Android API level. Probably you have specified invalid level value, or your copy of NDK/toolchain is broken."
)
endif
()
...
...
@@ -111,7 +112,7 @@ macro( __TOOLCHAIN_DETECT_API_LEVEL _path _expected)
message
(
FATAL_ERROR
"Could not verify Android API level. Probably you have specified invalid level value, or your copy of NDK/toolchain is broken."
)
endif
()
string
(
REGEX REPLACE
"
${
API_LEVEL_REGEX
}
"
"
\\
1"
ANDROID_LEVEL_FOUND
"
${
API_FILE_CONTENT
}
"
)
if
(
NOT
"
${
_expected
}
"
STREQUAL
""
)
if
(
DEFINED _expected
)
if
(
NOT
${
ANDROID_LEVEL_FOUND
}
EQUAL
${
_expected
}
)
message
(
FATAL_ERROR
"Specified Android API level does not match level found. Probably your copy of NDK/toolchain is broken."
)
endif
()
...
...
@@ -191,7 +192,7 @@ else()
sudo ln -s ~/my-android-toolchain
${
ANDROID_NDK_TOOLCHAIN_DEFAULT_SEARCH_PATH
}
"
)
endif
()
__TOOLCHAIN_DETECT_API_LEVEL
(
"
${
ANDROID_NDK_TOOLCHAIN_ROOT
}
/include/android/api-level.h"
)
__TOOLCHAIN_DETECT_API_LEVEL
(
"
${
ANDROID_NDK_TOOLCHAIN_ROOT
}
/
sysroot/usr/
include/android/api-level.h"
)
#message( STATUS "Using android NDK standalone toolchain from ${ANDROID_NDK_TOOLCHAIN_ROOT}" )
set
(
BUILD_WITH_ANDROID_NDK_TOOLCHAIN True
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment