[CMake] [PATCH] Qt cross compile with cmake v2.8.4

Markus Rathgeb maggu2810 at googlemail.com
Thu Mar 10 13:54:48 EST 2011


> Ok, and what was the error you were getting?
> Is this a problem because you have Qt installed in the same relative location
> from the non-rooted and rooted directory?

QT_LIBRARY_DIR, QT_HEADERS_DIR, ... are detected fine in and with the
given root path.
Then FIND_PATH is used to find the modules.
As paths that should be used to find the specified directory are
(e.g.) "${QT_HEADERS_DIR}/${QT_MODULE}" used.
We have to remember, that "${QT_HEADERS_DIR}" already contain the
${CMAKE_FIND_ROOT_PATH}.

In the "non patched version" all paths added on FIND_PATH will be
prefixed with "CMAKE_FIND_ROOT_PATH" again.
On the "patched version" this will be prevented by "NO_CMAKE_FIND_ROOT_PATH"

I attached a cut down strace output to explain what I mean.

You could compare it with the cmake Toolchain configuration file of
the last email.

As you can see, the compiled libraries libQtGui.so, libQtNetwork.so,
libQtSql.so, libQtXml.so could be found by the patched FindQt4.cmake

Could I show you, what I see as problem?


More information about the CMake mailing list