azzimzied / android-cmake

Automatically exported from code.google.com/p/android-cmake
0 stars 0 forks source link

CMAKE_FIND_ROOT_PATH causes series of mystical bugs #6

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Write CMakeLists that uses, for example, find_path for some puprose
2. Try to compile the project with android toolchain
3. Discover that your files are searched somewhere inside NDK

What is the expected output? What do you see instead?
Files were found correctly.

I've tried to use the toolchain to compile qt project. find_package (Qt4) just 
works fine usually when I give it path to qmake utility.
Pre-built Qt for android wasn't installed inside NDK directory for some reasons 
by Necessitas installer and I've tried to set QT_QMAKE_EXECUTABLE and 
cross-compile the project in usual way, but CMAKE_FIND_ROOT_PATH makes FindQt4 
module act in mystical way without any warnings.

The solution is to add "/" to the variable.

Original issue reported on code.google.com by VShapra...@betria.com on 26 Mar 2012 at 1:46

GoogleCodeExporter commented 9 years ago
I Changed the latest version to this:
# where is the target environment
set( CMAKE_FIND_ROOT_PATH_CUSTOM_APPEND CACHE STRING "Add custom path to the 
end of CMAKE_FIND_ROOT_PATH" )

# where is the target environment
set( CMAKE_FIND_ROOT_PATH "${ANDROID_TOOLCHAIN_ROOT}/bin" 
"${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}" 
"${ANDROID_SYSROOT}" "${CMAKE_INSTALL_PREFIX}" "${CMAKE_INSTALL_PREFIX}/share" 
"${CMAKE_FIND_ROOT_PATH_CUSTOM_APPEND}" )

Patch attached

Original comment by ma...@bernawebdesign.ch on 20 Sep 2012 at 1:03

Attachments:

GoogleCodeExporter commented 9 years ago
Still seeing this.

Original comment by LCIDF...@gmail.com on 10 Aug 2014 at 4:04