Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Call for Presentations - Qt World Summit

    Files do not appear in Projects list

    Tools
    4
    7
    2665
    Loading More Posts
    • 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.
    • D
      daviddoria last edited by

      I have created my project in QtCreator by opening an existing CMakeLists.txt file. On the "Edit" tab, in the "Projects" panel, I see the directory structure of my project, but only a few (6) out of the hundreds of source files in my project appear inside the directories. If I switch to "File System" in the drop down (verus "Projects"), I can see all the files. Is there a reason that the files would not have been included in the project? A pattern might be that it got the .cpp files, but skipped the .h and .hpp files?

      Thanks,

      David

      1 Reply Last reply Reply Quote 0
      • T
        tobias.hunger last edited by

        Creator will only see the files cmake considers to be part of the project. Unfortunately CMake projects tend to only list the source files:-(

        1 Reply Last reply Reply Quote 0
        • D
          Duck last edited by

          Are the "missing" files mentioned in the CMakeLists.txt? If so, can you give a pointer to that file?

          1 Reply Last reply Reply Quote 0
          • D
            daviddoria last edited by

            Duck, no, the hpp files are not required to be listed in the CMakeLists.txt because they are not compiled explicitly into their own objects.

            Is there a way to list these files in the CMake? Is there a "good CMake style" way to do this (since it works without the files being mentioned explicitly, it seems like there must be a special way to say "these files are part of the project, but don't do anything with them"?).

            Thanks,

            David

            1 Reply Last reply Reply Quote 0
            • D
              Duck last edited by

              I'd expect just adding the headers in the same place where you add the sources would do the trick. Whether that is good cmake style I don't know (I am not using it), but from Creator's point of view the question whether a certain file is considered "part of the project" or "part of the system" is answered by whether it is mentioned in the project file, independent of the build system.

              1 Reply Last reply Reply Quote 0
              • B
                braggpeaks last edited by

                I had another issue and came to this topic:

                Project files didn't show up in combination with CMake if the current directory has whitespaces (e.g. "Program Files (x86)" in it. Only CMakeLists.txt was listed in QtCreator 2.7.0, however, building succeeded without errors.

                1 Reply Last reply Reply Quote 0
                • T
                  tobias.hunger last edited by

                  braggpeaks: Please do not abduct threads. Open your own!

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post