Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to create Project using CMake in Qt creator

How to create Project using CMake in Qt creator

Scheduled Pinned Locked Moved Solved General and Desktop
22 Posts 4 Posters 7.6k 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.
  • S Offline
    S Offline
    sush123
    wrote on 20 Jan 2020, 06:50 last edited by
    #7

    Can anyone help me to find Ninja setup to install.
    I tried using below link but it is disappearing after double clicking on setup file not sure why,
    https://github.com/ninja-build/ninja/releases

    J 1 Reply Last reply 20 Jan 2020, 06:55
    0
    • S sush123
      20 Jan 2020, 06:50

      Can anyone help me to find Ninja setup to install.
      I tried using below link but it is disappearing after double clicking on setup file not sure why,
      https://github.com/ninja-build/ninja/releases

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 20 Jan 2020, 06:55 last edited by
      #8

      @sush123 Do you really need Ninja? Make (which is part of MinGW) can compile several files in parallel.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • S Offline
        S Offline
        sush123
        wrote on 20 Jan 2020, 08:55 last edited by
        #9

        i am not sure really need ninja or not but not able to narrow down a reason for getting error like
        " CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
        -- Configuring incomplete, errors occurred!?"

        After setting CMAKE_MAKE_PROGRAM, this as well

        J 1 Reply Last reply 20 Jan 2020, 08:56
        0
        • S sush123
          20 Jan 2020, 08:55

          i am not sure really need ninja or not but not able to narrow down a reason for getting error like
          " CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
          -- Configuring incomplete, errors occurred!?"

          After setting CMAKE_MAKE_PROGRAM, this as well

          J Offline
          J Offline
          jsulm
          Lifetime Qt Champion
          wrote on 20 Jan 2020, 08:56 last edited by jsulm
          #10

          @sush123 said in How to create Project using CMake in Qt creator:

          After setting CMAKE_MAKE_PROGRAM

          How, when and where did you set it?

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • S Offline
            S Offline
            sush123
            wrote on 20 Jan 2020, 10:17 last edited by
            #11

            Created new sample project by selecting :
            Application -> Qt Widgets Application ->build system (Cmake) in dropdown->Checked Desktop Qt 5.14.0 MinGW 64-bit.

            I can see project created in Qt creator which is not configured warning symbol before project name.

            J 1 Reply Last reply 20 Jan 2020, 12:29
            0
            • S sush123
              20 Jan 2020, 10:17

              Created new sample project by selecting :
              Application -> Qt Widgets Application ->build system (Cmake) in dropdown->Checked Desktop Qt 5.14.0 MinGW 64-bit.

              I can see project created in Qt creator which is not configured warning symbol before project name.

              J Offline
              J Offline
              jsulm
              Lifetime Qt Champion
              wrote on 20 Jan 2020, 12:29 last edited by
              #12

              @sush123 You need to set CMAKE_MAKE_PROGRAM in your projects Build settings: "Projects/Build & Run/YOUR_KIT/Build/CMake"

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              1
              • S Offline
                S Offline
                sush123
                wrote on 21 Jan 2020, 03:44 last edited by
                #13

                Yes i did that then it changed warning symbol into folder kind but then still i am getting this error :
                Running C:\Program Files\CMake\bin\cmake.exe C:/Users/s28194/Documents/untitled4 "-GCodeBlocks - Ninja" in C:\Users\s28194\Documents\build-untitled4-Desktop_Qt_5_14_0_MinGW_64_bit-Debug.
                CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
                -- Configuring incomplete, errors occurred!
                See also "C:/Users/s28194/Documents/build-untitled4-Desktop_Qt_5_14_0_MinGW_64_bit-Debug/CMakeFiles/CMakeOutput.log".
                CMake process exited with exit code 1.

                Also Build and run icons are disabled.

                J 1 Reply Last reply 21 Jan 2020, 06:08
                0
                • S sush123
                  21 Jan 2020, 03:44

                  Yes i did that then it changed warning symbol into folder kind but then still i am getting this error :
                  Running C:\Program Files\CMake\bin\cmake.exe C:/Users/s28194/Documents/untitled4 "-GCodeBlocks - Ninja" in C:\Users\s28194\Documents\build-untitled4-Desktop_Qt_5_14_0_MinGW_64_bit-Debug.
                  CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
                  -- Configuring incomplete, errors occurred!
                  See also "C:/Users/s28194/Documents/build-untitled4-Desktop_Qt_5_14_0_MinGW_64_bit-Debug/CMakeFiles/CMakeOutput.log".
                  CMake process exited with exit code 1.

                  Also Build and run icons are disabled.

                  J Offline
                  J Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on 21 Jan 2020, 06:08 last edited by
                  #14

                  @sush123 You should not pass -GNinja to CMake

                  Other possibility would be to install Ninja and add the path to it to PATH in your projects Build settings.

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  1
                  • S Offline
                    S Offline
                    sush123
                    wrote on 21 Jan 2020, 06:14 last edited by
                    #15

                    i tried adding ninja exe path under manage kits -> Cmake -> under manual i added "pathtofindninja",
                    Still no changes,
                    i could see error symbol with "Invalid codemodel file generated by Cmake " message under projects -> Build settings

                    J 1 Reply Last reply 21 Jan 2020, 06:16
                    0
                    • S sush123
                      21 Jan 2020, 06:14

                      i tried adding ninja exe path under manage kits -> Cmake -> under manual i added "pathtofindninja",
                      Still no changes,
                      i could see error symbol with "Invalid codemodel file generated by Cmake " message under projects -> Build settings

                      J Offline
                      J Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on 21 Jan 2020, 06:16 last edited by
                      #16

                      @sush123 said in How to create Project using CMake in Qt creator:

                      kits -> Cmake

                      This is for CMake and not Ninja!
                      Please add the path containing ninja.exe to PATH in your projects Build settings.

                      https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      2
                      • S Offline
                        S Offline
                        sush123
                        wrote on 21 Jan 2020, 06:23 last edited by
                        #17

                        @jsulm said in How to create Project using CMake in Qt creator:

                        PATH in

                        im really not finding where excatly i should add this ninja exe path in project settings.

                        J 1 Reply Last reply 21 Jan 2020, 06:27
                        0
                        • S sush123
                          21 Jan 2020, 06:23

                          @jsulm said in How to create Project using CMake in Qt creator:

                          PATH in

                          im really not finding where excatly i should add this ninja exe path in project settings.

                          J Offline
                          J Offline
                          jsulm
                          Lifetime Qt Champion
                          wrote on 21 Jan 2020, 06:27 last edited by
                          #18

                          @sush123 "Projects/Build & Run/YOUR_KIT/Build/Build Environment" - edit PATH variable here (append directory containing ninja.exe).

                          https://forum.qt.io/topic/113070/qt-code-of-conduct

                          1 Reply Last reply
                          3
                          • S Offline
                            S Offline
                            sush123
                            wrote on 21 Jan 2020, 09:16 last edited by
                            #19

                            i did append path C:\Qt\Qt5.14.0\Tools\mingw730_64\bin;C:\Users\s28194\Documents\ninja.exe;C:\Users\s28194\AppData\Local\Microsoft\WindowsApps;

                            still i have disabled icons for build and run at left bottom.

                            J 1 Reply Last reply 21 Jan 2020, 10:04
                            0
                            • S sush123
                              21 Jan 2020, 09:16

                              i did append path C:\Qt\Qt5.14.0\Tools\mingw730_64\bin;C:\Users\s28194\Documents\ninja.exe;C:\Users\s28194\AppData\Local\Microsoft\WindowsApps;

                              still i have disabled icons for build and run at left bottom.

                              J Offline
                              J Offline
                              jsulm
                              Lifetime Qt Champion
                              wrote on 21 Jan 2020, 10:04 last edited by
                              #20

                              @sush123 said in How to create Project using CMake in Qt creator:

                              C:\Users\s28194\Documents\ninja.exe

                              This is wrong. In PATH you only add directories, so:

                               C:\Qt\Qt5.14.0\Tools\mingw730_64\bin;C:\Users\s28194\Documents
                              

                              https://forum.qt.io/topic/113070/qt-code-of-conduct

                              1 Reply Last reply
                              3
                              • S Offline
                                S Offline
                                sush123
                                wrote on 21 Jan 2020, 10:20 last edited by
                                #21

                                thank you so much it configured

                                J 1 Reply Last reply 21 Jan 2020, 11:44
                                1
                                • S sush123
                                  21 Jan 2020, 10:20

                                  thank you so much it configured

                                  J Offline
                                  J Offline
                                  jsulm
                                  Lifetime Qt Champion
                                  wrote on 21 Jan 2020, 11:44 last edited by
                                  #22

                                  @sush123 Great I could help! :-)

                                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                                  1 Reply Last reply
                                  1

                                  16/22

                                  21 Jan 2020, 06:16

                                  • Login

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