SemtexB
SemtexB

Reputation: 660

Add CMake project as subproject in CMake project in Qt Creator

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.

Upvotes: 6

Views: 1611

Answers (1)

Creepercdn
Creepercdn

Reputation: 52

No, you can't add a CMake subject as a sub project.

Sub project is based of qmake.

Upvotes: 1

Related Questions