Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-23957

Wrong project structure: CMake source_groups

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P3: Somewhat important
    • None
    • Qt Creator 4.11.0
    • Ubuntu 20.04
      Qt 4.11.1
    • Linux/X11

    Description

      I use QtCreator to develop a CMake based project.

      My file structure is as following:

       

      MyProject
          Subproject1
            CMakeLists.txt
                include
                    file1.h
                src
                    file1.cpp
      
          Subproject2
            CMakeLists.txt
                include
                    file2.h
                src
                    file2.cpp
      

       

      The main CMakeLists.txt:

       

      project(MyProject)
      add_subdirectory(Subproject1)
      add_subdirectory(Subproject2)

       

      The subproject's project file is something like this:

       

      project(Subproject1)
      file(GLOB SRC . src/*.cpp)
      file(GLOB INC . include/*.h)
      add_library(${PROJECT_NAME} SHARED ${SRC} ${INC})

       

       

      In QtCreator the same structure looks a bit different:

       

      MyProject
          Subproject1
            CMakeLists.txt
               Header Files <-------------
                    include
                        file1.h
                Source Files <----------------
                    src
                        file1.cpp
      
      ... 

      There are 2 unnecessary pseudo folders(Header Files, Source Files) that  very confusing.  I found no option to remove it. Setting Simplify tree options in the filters menu just mixes up all the structure, for example it pit all the CMakeLists.txt together, from all the project that makes the structure totally unreadable.

       

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              hunger Tobias Hunger
              folibis ruslan
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes