I have a directory layout like the following
projectA/
|-- CMakeLists.txt
|-- src/
|-- main.cpp
projectB/
|-- CMakeLists.txt
|-- src/
|-- file1.cpp
|-- file1.hpp
|-- file2.hpp
|-- main.cpp
|-- third_party/
|-- include
|-- lib1
I opened both project successfully in Qt Creator (using Ctrl+O and open the CMakeLists.txt
file) and they're are able to build and run independently.
I need to gain access to file1.Xpp
and file2.hpp
from projectA
. Is there a way in Qt Creator to add projectB
as a subproject in projectA
? And One might keep in mind that file1.Xpp
and file2.hpp
might depend on the third party library.
Using Ctrl+N
-> Other Project
-> Subdirs Project
I can add a subproject, but only an empty one, if I'm not mistaken.
You can use CMake from Qt Creator to build applications for the desktop, as well as mobile and embedded devices. You can also build single files to test your changes. Qt Creator automatically detects the CMake executable specified in the PATH .
Both are build systems, but they're not very similar at all. If your project uses Qt, you're probably best off using qmake. CMake is more generic, and fits pretty much any type of project. Both qmake and CMake generate a Makefile, which is read by make to build the project.
No, you can't add a CMake subject as a sub project.
Sub project is based of qmake.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With