Results 1 to 1 of 1

Thread: Setup QtCreator with cross compiling cmake project

  1. #1

    Default Setup QtCreator with cross compiling cmake project

    Hi,

    I'm using QtCreator 4.0.1 and I'm trying to cross compile a qt cmake project, but it fails like this at ./cmake stage:
    Full cmake log can be seen in the attached cmake.txt file.

    -- Disabled building system-sync projects
    -- Enabled building the trip logger project
    -- Enabled building the Front-End SDK
    -- Enabled building the tests
    -- Configuring done
    You have changed variables that require your cache to be deleted.
    Configure will be re-run and you may have to reset some variables.
    The following variables have changed:
    CMAKE_C_COMPILER= /mnt/bloks-sina-rootfs/usr/bin/cc
    CMAKE_C_COMPILER= /mnt/bloks-sina-rootfs/usr/bin/cc
    CMAKE_C_COMPILER= /mnt/bloks-sina-rootfs/usr/bin/cc
    CMAKE_C_COMPILER= /mnt/bloks-sina-rootfs/usr/bin/cc
    CMAKE_C_COMPILER= /mnt/bloks-sina-rootfs/usr/bin/cc

    -- The C compiler identification is GNU 5.4.0
    -- The CXX compiler identification is GNU 4.9.1
    -- Check for working C compiler: /mnt/bloks-sina-rootfs/usr/bin/cc
    -- Check for working C compiler: /mnt/bloks-sina-rootfs/usr/bin/cc -- works
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done



    I attached the setup of the kit!


    So my issue is that after the cmake configuration is finished, qt creator comes up with the cache issue and runs again cmake with other env variables:

    -- Configuring done
    You have changed variables that require your cache to be deleted.
    Configure will be re-run and you may have to reset some variables.
    The following variables have changed:



    I'm using a toolchain file for cross compiling and passing it to qtcreator in the CMake Configuration like this: "CMAKE_TOOLCHAIN_FILE:STRING=~/toolchain.cmake".
    I have only the "CMAKE_TOOLCHAIN_FILE" in my "CMake Configuration."

    # this one is important
    SET(CMAKE_SYSTEM_NAME Linux)
    #this one not so much
    SET(CMAKE_SYSTEM_VERSION 1)
    # specify the cross compiler
    SET(CMAKE_C_COMPILER /home/ciprian/tmp/qtQUICKimg/toolchain/gcc-linaro-4.9-2014.05-arm-linux-gnueabihf-x86_64-linux-gnu/bin/arm-linux-gnueabihf-gcc)
    SET(CMAKE_CXX_COMPILER /home/ciprian/tmp/qtQUICKimg/toolchain/gcc-linaro-4.9-2014.05-arm-linux-gnueabihf-x86_64-linux-gnu/bin/arm-linux-gnueabihf-g++)
    # specify the sysroot
    SET(CMAKE_SYSROOT /mnt/bloks-sina-rootfs/)

    SET(CMAKE_PREFIX_PATH /mnt/bloks-sina-rootfs/usr/local/qt5.6.1/lib/cmake)

    # search for programs in the build host directories
    SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
    # for libraries and headers in the target directories
    SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
    SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by cmanea; 16th August 2016 at 10:27.

Similar Threads

  1. Replies: 6
    Last Post: 25th June 2013, 22:13
  2. Replies: 0
    Last Post: 20th November 2011, 13:41
  3. setup QTcreator and carbide C++ for S60 5th on windows 7
    By nhs_0702 in forum Qt for Embedded and Mobile
    Replies: 3
    Last Post: 29th May 2011, 19:55
  4. QtCreator and cross-compiling
    By zuck in forum Qt Tools
    Replies: 1
    Last Post: 28th April 2009, 21:04
  5. Cross compiling setup for all platforms
    By oc2k1 in forum Installation and Deployment
    Replies: 0
    Last Post: 5th February 2008, 14:42

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.