crosscompiling: what happened after change cmakelists.txt?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

crosscompiling: what happened after change cmakelists.txt?

Dave Milter
Hi,

when I run cmake like this:
cmake -DCMAKE_TOOLCHAIN_FILE=toolchain-sdk-gcc.cmake
-DMY_TOOLCHAIN_PATH=$HOME/toolchains/sdk/ path/to/CMakeLists.txt

with toolchain-sdk-gcc.cmake:

SET(CMAKE_SYSTEM_NAME Linux)
SET(CMAKE_SYSTEM_VERSION 1)

SET(QT_QMAKE_EXECUTABLE ${MY_TOOLCHAIN_PATH}/bin/qmake)

# specify the cross compiler
SET(CMAKE_C_COMPILER   ${MY_TOOLCHAIN_PATH}/bin/arm-angstrom-linux-gnueabi-gcc)
SET(CMAKE_CXX_COMPILER ${MY_TOOLCHAIN_PATH}/bin/arm-angstrom-linux-gnueabi-g++)

all works fine,  it found suitable qt build for ARM,
but later if I modify CMakeLists.txt and type "make",
it lose right path to qmake (but right path to , replace it with path
to system qt, build for x86.

So question, how can I force cmake to cache

QT_QMAKE_EXECUTABLE like CMAKE_C_COMPILER, and do not lose
right path to qmake?
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake