'not repeating directory structure in cmake include
I have the following folder structure:
Project
|-Sources
| |-Package1
| |-Component11
| |-include
| |-header.hpp
| |-src
| |-source.cpp
| |-CMakeLists.txt
| |-Component12
| |-include
| |-header.hpp
| |-src
| |-source.cpp
| |-CMakeLists.txt
| |-CMakeLists.txt
| |-Package2
| |-Component21
| |-...
| |-Component22
| |-...
| |-CMakeLists.txt
| |-CMakeLists.txt
|-CMakeLists.txt
Lets say that in this design the component21
have a dependency on component11
.
I would like to include the header files of component11
in this component as:
#include<Project/Package1/Component11/header.hpp>
without repeating this path in include
folder of component11
by creating sub directories there. Is there a way in cmake that i can achieve this?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|