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. CMake fails on every project (exit code 1) even after deleting build directory
Forum Updated to NodeBB v4.3 + New Features

CMake fails on every project (exit code 1) even after deleting build directory

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 2 Posters 102 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.
  • T Offline
    T Offline
    thomasGl
    wrote last edited by
    #1

    Hey guys. It was always working absolutely fine. Then, at some point, I changed something in CMake. After that I deleted everything (build directory, cache, etc.). And now I’m receiving the exact same CMake error with every project. It does not create anything now, i dont understand why.

    1.png

    1 Reply Last reply
    0
    • T thomasGl deleted this topic
    • T thomasGl restored this topic
    • T Offline
      T Offline
      thomasGl
      wrote last edited by thomasGl
      #2

      I have to delete the cmake.txt manually every time now. It generates a cmake file automaticaly but with errors. It wasnt like that.

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

        Hi,

        Which version of CMake are you using ?
        Do you the same issue if you run cmake manually ?
        What do you mean by "I changed something in CMake" ?

        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
        • T Offline
          T Offline
          thomasGl
          wrote last edited by
          #4

          I am using CMake version 3.30.5. I made some changes in the CMakeLists.txt file, but then I deleted everything and it should have worked afterwards. As I mentioned, the problem appeared suddenly it had always worked before.

          cmake_minimum_required(VERSION 3.16)
          
          project(hgjhjghj VERSION 0.1 LANGUAGES CXX)
          
          set(CMAKE_CXX_STANDARD_REQUIRED ON)
          
          
          qt_add_executable(apphgjhjghj
              main.cpp Main.qml
          )
          
          qt_add_qml_module(apphgjhjghj
              URI hgjhjghj
              VERSION 1.0
              QML_FILES
                  Main.qml
          )
          
          # Qt for iOS sets MACOSX_BUNDLE_GUI_IDENTIFIER automatically since Qt 6.1.
          # If you are developing for iOS or macOS you should consider setting an
          # explicit, fixed bundle identifier manually though.
          set_target_properties(apphgjhjghj PROPERTIES
          #    MACOSX_BUNDLE_GUI_IDENTIFIER com.example.apphgjhjghj
              MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
              MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
              MACOSX_BUNDLE TRUE
              WIN32_EXECUTABLE TRUE
          )
          
          target_link_libraries(apphgjhjghj
              PRIVATE Qt6::Quick
          )
          
          include(GNUInstallDirs)
          install(TARGETS apphgjhjghj
              BUNDLE DESTINATION .
              LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
              RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
          )
          
          1 Reply Last reply
          0
          • T Offline
            T Offline
            thomasGl
            wrote last edited by
            #5

            ok, i reinstall qt and now it works.

            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