Qt VSTools versus CMake build
-
wrote 27 days ago last edited by
Depending which tool I use for the build/deploy I get a different directory structure
VS/MSBuild/Qt VSTools:
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 -
wrote 27 days ago last edited by
I found the config option that puts the plugins in their own directory in the VSTools configuration so all now clear.
-
-
-
wrote 27 days ago last edited by Perdrix
-
wrote 27 days ago last edited by
-
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. -
wrote 24 days ago last edited by
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.
-
wrote 23 days ago last edited by
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.)
-
@SimonSchroeder Is the cmake-gui any good? Just like git, I always found the command line easier to use....
-
@SimonSchroeder Is the cmake-gui any good? Just like git, I always found the command line easier to use....
wrote 22 days ago last edited by@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.
3/9