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. QtCreator and call conan inside the ide - cmake: command not found

QtCreator and call conan inside the ide - cmake: command not found

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
6 Posts 2 Posters 1.3k 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.
  • K Offline
    K Offline
    Kintawesar
    wrote on last edited by
    #1

    I'am trying to use conan package manager with QtCreator and cmake with https://github.com/conan-io/cmake-conan wrapper, so I have installed cmake 3.17.3 and conan using brew

    After that conan downloaded all dependencies of sdl2_image but it was not able to find cmake for build the library with errors:

    sdl2_image/2.0.5@bincrafters/stable: Calling build()
    /bin/sh: cmake: command not found

    cmake command from QtCreator

    Running /usr/local/Cellar/cmake/3.17.3/bin/cmake /Users/kirillprohorenkov/Documents/Projects/cpp_starter_project '-GCodeBlocks - Unix Makefiles' -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_CXX_COMPILER:FILEPATH=/usr/bin/clang++ -DCMAKE_C_COMPILER:STRING=/usr/bin/clang -DCMAKE_PREFIX_PATH:STRING= -DCPP_STARTER_USE_SDL:BOOL=ON -DENABLE_TESTING:BOOL=OFF -DWARNINGS_AS_ERRORS:BOOL=OFF in /Users/kirillprohorenkov/Documents/Projects/cpp_starter_project/build
    

    So, I've tried to perform these command by hand:

    cd build && cmake /Users/kirillprohorenkov/Documents/Projects/cpp_starter_project '-GCodeBlocks - Unix Makefiles' -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_CXX_COMPILER:FILEPATH=/usr/bin/clang++ -DCMAKE_C_COMPILER:STRING=/usr/bin/clang -DCMAKE_PREFIX_PATH:STRING= -DCPP_STARTER_USE_SDL:BOOL=ON -DENABLE_TESTING:BOOL=OFF  ../
    

    and library has built successfully.

    Used version of software:

    • Operating System Mac os x 10.14.6
    • Compiler+version: Apple LLVM version 10.0.1 (clang-1001.0.46.4)
    • Conan version: 1.25.2
    • Qtcreator 4.11.0

    Does QtCreator remove cmake from PATH when calling from inside the IDE?
    Any workaround and etc?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      One thing you can try is to nuke the build folder, the .pro.user file in your project directory and re-open the project in Qt Creator.

      IIRC, you can also set the cmake version used in your Kit. You should check what you have there.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      K 1 Reply Last reply
      1
      • SGaistS SGaist

        Hi and welcome to devnet,

        One thing you can try is to nuke the build folder, the .pro.user file in your project directory and re-open the project in Qt Creator.

        IIRC, you can also set the cmake version used in your Kit. You should check what you have there.

        K Offline
        K Offline
        Kintawesar
        wrote on last edited by
        #3

        @SGaist clear the build folder, reopen IDE are the first things I have done.
        I also tried to call cmake version inside of QtCreator(in CmakeLists.txt) like this:

        execute_process(COMMAND cmake --version)

        but the version string was empty. My suggest is problem with conan in it

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Did you check whether the cmake path was set in your kit ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          K 1 Reply Last reply
          0
          • SGaistS SGaist

            Did you check whether the cmake path was set in your kit ?

            K Offline
            K Offline
            Kintawesar
            wrote on last edited by
            #5

            @SGaist yes, cmake path in kit is /usr/local/bin/cmake
            Cmake was detected by QtCreator

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Can you provide a minimal project that shows that behavior ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0

              • Login

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