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 build "subdirs" project using xxx.txt ?
Forum Updated to NodeBB v4.3 + New Features

How to build "subdirs" project using xxx.txt ?

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 3 Posters 670 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.
  • A Offline
    A Offline
    Anonymous_Banned275
    wrote on last edited by
    #1

    My first exposure to xxx.txt , I am busy RTFM , I am not done reading it all , and cannot figure out how to build "subdirs" project. It looks as the "old" .pro ways won't work.

    Is there an example how to build "subdirs" using xxx.txt files?
    It would sure help.

    586fd76b-c5f9-41d7-9404-96337214378e-image.png

    VRoninV 1 Reply Last reply
    0
    • A Anonymous_Banned275

      My first exposure to xxx.txt , I am busy RTFM , I am not done reading it all , and cannot figure out how to build "subdirs" project. It looks as the "old" .pro ways won't work.

      Is there an example how to build "subdirs" using xxx.txt files?
      It would sure help.

      586fd76b-c5f9-41d7-9404-96337214378e-image.png

      VRoninV Offline
      VRoninV Offline
      VRonin
      wrote on last edited by
      #2

      @AnneRanch said in How to build "subdirs" project using xxx.txt ?:

      Is there an example how to build "subdirs" using xxx.txt files?

      I imagine this means CMakeLists.txt.
      There is no project-type in CMake, it's more flexible, you can mix-and-match in the same file. In any case you can simply use add_subdirectory(NameOfSubdirectory) to include a subdirectory containing its own CMakeLists.txt

      P.S.
      Note that you can't mix CMakeLists.txt with *.pro files in the same project

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      A 1 Reply Last reply
      1
      • VRoninV VRonin

        @AnneRanch said in How to build "subdirs" project using xxx.txt ?:

        Is there an example how to build "subdirs" using xxx.txt files?

        I imagine this means CMakeLists.txt.
        There is no project-type in CMake, it's more flexible, you can mix-and-match in the same file. In any case you can simply use add_subdirectory(NameOfSubdirectory) to include a subdirectory containing its own CMakeLists.txt

        P.S.
        Note that you can't mix CMakeLists.txt with *.pro files in the same project

        A Offline
        A Offline
        Anonymous_Banned275
        wrote on last edited by
        #3

        @VRonin Nice - so my entire project based on .pro down the toilet... So where is the QT menu option to "add_directory " , or do I have to add it in CMakeLists.txt? If so hope I can find it in documentation.

        VRoninV 1 Reply Last reply
        0
        • C Offline
          C Offline
          ChrisW67
          wrote on last edited by
          #4

          @AnneRanch said in How to build "subdirs" project using xxx.txt ?:

          Nice - so my entire project based on .pro down the toilet...

          Of course not. You can use qmake or you can use cmake; your choice. The source code is not magically going to vanish because you choose to change the utility that orchestrates building the project.

          1 Reply Last reply
          0
          • A Anonymous_Banned275

            @VRonin Nice - so my entire project based on .pro down the toilet... So where is the QT menu option to "add_directory " , or do I have to add it in CMakeLists.txt? If so hope I can find it in documentation.

            VRoninV Offline
            VRoninV Offline
            VRonin
            wrote on last edited by VRonin
            #5

            @AnneRanch said in How to build "subdirs" project using xxx.txt ?:

            So where is the QT menu option to "add_directory " , or do I have to add it in CMakeLists.txt

            CMake is a lot more flexible than .pro files, there are multiple ways to do the same thing and this makes it difficult to automate. This means Qt Creator has no "menu options" to do stuff, you actually have to edit the CMakeLists.txt manually. You can use this project as an example of a subdir + test project

            "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
            ~Napoleon Bonaparte

            On a crusade to banish setIndexWidget() from the holy land of Qt

            A 1 Reply Last reply
            1
            • VRoninV VRonin

              @AnneRanch said in How to build "subdirs" project using xxx.txt ?:

              So where is the QT menu option to "add_directory " , or do I have to add it in CMakeLists.txt

              CMake is a lot more flexible than .pro files, there are multiple ways to do the same thing and this makes it difficult to automate. This means Qt Creator has no "menu options" to do stuff, you actually have to edit the CMakeLists.txt manually. You can use this project as an example of a subdir + test project

              A Offline
              A Offline
              Anonymous_Banned275
              wrote on last edited by
              #6

              @VRonin Thank you - that is exactly what I need to "switch" to cmake. I was not aware that there is cmake. Appreciate your help.
              SOLVED CASE CLOSED

              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