Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Qt VSTools versus CMake build
Forum Updated to NodeBB v4.3 + New Features

Qt VSTools versus CMake build

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
9 Posts 3 Posters 209 Views 3 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.
  • PerdrixP Offline
    PerdrixP Offline
    Perdrix
    wrote last edited by
    #1

    Depending which tool I use for the build/deploy I get a different directory structure

    VS/MSBuild/Qt VSTools:

    1b66746d-b078-4622-a4d8-5b434a997633-image.png

    CMake:
    afc8e622-a74a-4abe-b25c-b6b1d2cd91a5-image.png

    Now it's an age since I did the VSTools setup for this so it might be a configuration setting in VSTools causing that, but I'd like to understand why it's different, and whether I can tweak VSTools to create a directory structure the same as CMake.

    Thanks
    David

    1 Reply Last reply
    0
    • PerdrixP Offline
      PerdrixP Offline
      Perdrix
      wrote last edited by
      #2

      I found the config option that puts the plugins in their own directory in the VSTools configuration so all now clear.

      1 Reply Last reply
      0
      • PerdrixP Perdrix has marked this topic as solved
      • PerdrixP Perdrix has marked this topic as unsolved
      • PerdrixP Offline
        PerdrixP Offline
        Perdrix
        wrote last edited by Perdrix
        #3

        Hmmm I set that option to plugins in all the projects of my "solution":
        image.png
        that get "deployed", but still end up with:

        b866a5ee-0c54-44ba-b521-3783652f0374-image.png

        I then changed that option to: @(_-->'%(OutDir)')/plugins in every project (even those that were set to not deploy).

        That got me:

        c05d4761-f8ca-47d5-ad5c-19fb8a1ff798-image.png

        Confused.

        1 Reply Last reply
        0
        • PerdrixP Offline
          PerdrixP Offline
          Perdrix
          wrote last edited by
          #4

          Hmmm If I set all my projects to NOT run the deploy I get:
          image.png
          So a basic deploy gets run with "default" options. This doesn't feel right!

          1 Reply Last reply
          0
          • Axel SpoerlA Offline
            Axel SpoerlA Offline
            Axel Spoerl
            Moderators
            wrote last edited by
            #5

            Making vstools behave like CMake is a bit of shoehorning.
            Why not use CMake in the first place?
            This part of the documentation shows how to configure vstools. However, there is no checkbox to say "make it look like CMake". You basically have to set custom output directories. If using QML, you have to redirect QML output and define post-build steps to copy all the QML files, qmldir, plugins and what not. The only good news is that you can place all of that into a property sheet that you can re-use for other projects.
            Or even share it here - I guess others will be thankful.

            Software Engineer
            The Qt Company, Oslo

            1 Reply Last reply
            1
            • PerdrixP Offline
              PerdrixP Offline
              Perdrix
              wrote last edited by
              #6

              I was simply hoping that I could get the result of my builds the same regardless of how I got there.

              As things are, I am going to use CMake for builds that will be released into the big wide world and VS for day to day development builds as that very convenient.

              1 Reply Last reply
              0
              • S Offline
                S Offline
                SimonSchroeder
                wrote last edited by
                #7

                In theory, in VS you can "Open folder" with a CMake based project. I never had good luck with this approach. Instead, I'm usually using cmake-gui to configure the CMake project and it'll generate a VS project. (Certainly, you should be able to do this from the command line as well.)

                1 Reply Last reply
                0
                • Axel SpoerlA Offline
                  Axel SpoerlA Offline
                  Axel Spoerl
                  Moderators
                  wrote last edited by
                  #8

                  @SimonSchroeder Is the cmake-gui any good? Just like git, I always found the command line easier to use....

                  Software Engineer
                  The Qt Company, Oslo

                  S 1 Reply Last reply
                  0
                  • Axel SpoerlA Axel Spoerl

                    @SimonSchroeder Is the cmake-gui any good? Just like git, I always found the command line easier to use....

                    S Offline
                    S Offline
                    SimonSchroeder
                    wrote last edited by
                    #9

                    @Axel-Spoerl said in Qt VSTools versus CMake build:

                    Is the cmake-gui any good? Just like git, I always found the command line easier to use....

                    So far, I have never really learned CMake in depth. I have run into problems with CMake on the command line when reconfiguring with different options (because you forgot one). The cmake-gui (and also ccmake on the command line) seem to do the correct thing in the background. Especially on Windows, the default of the cmake-gui is to generate a VS project (there is even a button to directly open the project from the cmake-gui). For someone without any knowledge of CMake this is a much better starting point (especially for 3rd-party libraries) than using the command line.

                    One advantage of cmake-gui and ccmake is that you see all the different options that you can change. By default you only see the options of the project's CMakeList.txt, but you can toggle the advanced mode to see all CMake options as well.

                    1 Reply Last reply
                    2

                    • Login

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