Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Creating CMakeLists.txt for baremetal (was: copying CMakeLists.txt to build directory)
QtWS25 Last Chance

Creating CMakeLists.txt for baremetal (was: copying CMakeLists.txt to build directory)

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
4 Posts 2 Posters 525 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mzimmers
    wrote on 1 Sept 2021, 01:31 last edited by mzimmers 9 Jan 2021, 18:47
    #1

    Hi all -

    I'm trying to set up a project for CMake, but I've run into a problem. My CMakeLists.txt file is in with my other project files (*.c, *.h). When I configure my kit, how do I tell Creator that I want to have this file copied to the build directory? (I don't want an in-source build.)

    Thanks...

    1 Reply Last reply
    0
    • C Offline
      C Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on 1 Sept 2021, 14:32 last edited by
      #2

      A CMakeLists.txt is never copied to a build dir. It belongs to the sources.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      M 1 Reply Last reply 1 Sept 2021, 14:36
      0
      • C Christian Ehrlicher
        1 Sept 2021, 14:32

        A CMakeLists.txt is never copied to a build dir. It belongs to the sources.

        M Offline
        M Offline
        mzimmers
        wrote on 1 Sept 2021, 14:36 last edited by mzimmers 9 Jan 2021, 15:12
        #3

        @Christian-Ehrlicher OK, then why am I getting a warning "No CMake configuration found!" here?
        qt.PNG

        EDIT:

        I'm not sure whether this is relevant, but I do get a configuration error when I run CMake:

        /usr/local/gcc-arm-none-eabi-10.3-2021.07/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/lib/libc.a(lib_a-exit.o): in function `exit': exit.c:(.text.exit+0x2c): undefined reference to `_exit' collect2: error: ld returned 1 exit status ninja: build stopped: subcommand failed.
        

        One of these problems may well be causing the other.

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mzimmers
          wrote on 1 Sept 2021, 18:46 last edited by
          #4

          Found the answer here:

          I added this line to my CMakeLists.txt file:

          set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --specs=nosys.specs")
          

          Seems to have solved it.

          1 Reply Last reply
          1

          2/4

          1 Sept 2021, 14:32

          • Login

          • Login or register to search.
          2 out of 4
          • First post
            2/4
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved