Windows + Cmake multiproject template
-
Good morning.
I switched to Qt 6.2 and cmake some weeks ago and, however bumpy sometimes that friendship is, we get along with cmake.
But this morning I need to revisit some old tool of mine, designed to work on Windows only, so I thought "why not convert it from qmake?". Usually I don't have a problem with that, I just write cmakelists file by hand looking at the .pro file and done.But this project is good old multidir one, simple as can be. But somewhat problematic. The .pro file goes:
TEMPLATE = subdirs SUBDIRS += \ NameOfMyTool \ icmp DISTFILES += \ README.md \ Doxyfile
(the tool itself is a library named
icmp
and the tool itself, it is simple connectivity tester for my users using Windows, it performs several network tests with visual gui, icmp library is just a wrapper around WinAPI calls)So according to the cmake docs this should be straightforward as
add_subdirectory()
and so on, after writing cmake lists for library and the executable but I wanted to see how Qt does that - so I started to create new multi project in QtCreator (5.0.3) but it resulted in the new qmake project? With single project I am given a choice between qmake/cmake.- is this a bug or a feature?
- what is the QtCreator template for this use case - is it just regular cmake grammar or anything specific?
I am using, in this case, Qt 6.2.1/MinGW 8 + Windows 10/11, cmake from Qt installation.
Many thanks in advance,
Artur -
A artwaw has marked this topic as solved on