Multi-project "Solution" in QT Creator (conversion form Visual Studio).
-
Right now my application runs only on Windows. However I am getting closer to completing the code changes that should allow it to run under Linux and MacOS.
With that in mind, I can't continue to use MS Visual Studio as the build environment.
At present Visual Studio allows me to build all the parts of my application as separate "Projects" So I have a few projects that create static libraries, then a project for the GUI version of the application, the Command Line version, and the "Live" version. In addition there's a project to build test cases.
When I want to build everything I just tell Visual Studio to build the solution and it sorts out the correct build order from the dependencies, and does it.
Can I do this with Qt Creator? If so how to do so.
Is there a neat tool to convert a Visual Studio Solution to use Qt Creator?
Thanks
David -
@Perdrix said in Multi-project "Solution" in QT Creator (conversion form Visual Studio).:
Can I do this with Qt Creator?
I don't see what an IDE has to do with build dependencies
If so how to do so.
Use a proper build system like cmake, define the correct dependencies (e.g. through target_link_libraries()) and you're done.
-
Both Visual Studio and Qt Creator are just IDEs. A "solution" and "project" are concepts of a build system, particularly of MSBuild, which is used by default in Visual Studio. It's the build system that handles dependencies and build order, not the IDE.
MSBuild is not cross platform, so you need to switch to something that is. A popular choice is CMake, which is also the default build system used by Qt itself starting from Qt6. While MSBuild uses .sln and .vcproj files for its solution and projects, CMake does not have a notion of solution, just a tree-like hierarchy of projects (a top level project is kinda solution equivalent).
Since CMake is a very broadly used build system most IDEs support it, including both Qt Creator and Visual Studio, so you don't really need to switch IDEs if you don't want to.
-
Hi David,
No Makefiles by hand! CMake is the right solution for deep sky stacker.
Here is a tool that I often use, it should do most of the work for you. However, you might want to polish the CMake files manually.
Cheers
Axel -
@Axel-Spoerl said in Multi-project "Solution" in QT Creator (conversion form Visual Studio).:
Hi David,
No Makefiles by hand! CMake is the right solution for deep sky stacker.
Here is a tool that I often use, it should do most of the work for you. However, you might want to polish the CMake files manually.
Cheers
AxelAxel, You are a star ... Huge thanks for the pointer.
Is there an equivalent one for qmake?
-
@Perdrix said in Multi-project "Solution" in QT Creator (conversion form Visual Studio).:
OK, I wasn't aware you'd deprecated qmake. Thanks for clarification
I don't have such power 😁