It's possible to add cmake based project to .pro a.k.a qmake build process ? I would like build need CMake projects together with qmake based project using subdir template.
It's possible to add cmake based project to .pro a.k.a qmake build process ? I would like build need CMake projects together with qmake based project using subdir template.
Hmm, you might need some dummy source file to satisfy the requirements of the lib target inside your custom .pro file for the sub project and a custom target that actually runs the build.
The cmake step is probably just a call with QMake's system() inside the .pro file for the sub directory.
Though it might be worthwhile to consider switching to cmake for the overall project.
Cheers,
_
There is Qt documentation on using CMake with Qt. There is similar documentation on the KDAB web site.
There is an (abandoned) SourceForge project which supposedly generates CMakelists.txt files from .pro files, but as the comments there imply, it may not work well for complex Qt projects.
It would be better from a maintainability point of view to just pick one build system or the other and port your projects to use that one exclusively. Otherwise, I think anda_skoa's suggestion to run cmake from QMake (or the corresponding cmake version to run an external QMake process) is the only way to have a mixed build system.
A mixed build system would probably give you headaches trying to track down why (and where) builds fail, because the two build systems probably won't communicate problems to each other very well.
<=== The Great Pumpkin says ===>
Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.
Bookmarks