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
Forum Updated to NodeBB v4.3 + New Features

How to create Project using CMake in Qt creator

Scheduled Pinned Locked Moved Solved General and Desktop
22 Posts 4 Posters 7.7k Views 1 Watching
  • 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 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

    jsulmJ 1 Reply Last reply
    0
    • S sush123

      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

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on 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 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

        jsulmJ 1 Reply Last reply
        0
        • S sush123

          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

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on 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 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.

            jsulmJ 1 Reply Last reply
            0
            • S sush123

              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.

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on 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 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.

                jsulmJ 1 Reply Last reply
                0
                • S sush123

                  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.

                  jsulmJ Offline
                  jsulmJ Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on 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 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

                    jsulmJ 1 Reply Last reply
                    0
                    • S sush123

                      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

                      jsulmJ Offline
                      jsulmJ Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on 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 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.

                        jsulmJ 1 Reply Last reply
                        0
                        • S sush123

                          @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.

                          jsulmJ Offline
                          jsulmJ Offline
                          jsulm
                          Lifetime Qt Champion
                          wrote on 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 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.

                            jsulmJ 1 Reply Last reply
                            0
                            • S sush123

                              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.

                              jsulmJ Offline
                              jsulmJ Offline
                              jsulm
                              Lifetime Qt Champion
                              wrote on 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 last edited by
                                #21

                                thank you so much it configured

                                jsulmJ 1 Reply Last reply
                                1
                                • S sush123

                                  thank you so much it configured

                                  jsulmJ Offline
                                  jsulmJ Offline
                                  jsulm
                                  Lifetime Qt Champion
                                  wrote on last edited by
                                  #22

                                  @sush123 Great I could help! :-)

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

                                  1 Reply Last reply
                                  1

                                  • Login

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