I have a third-party static library that I would like to add to a project, and as there are ongoing updates to the library, I would like to stick to a single CMakeLists.txt in root (if possible) - or at least a setup that requires the least amount of customization each time the library is updated.
Let's say my file structure is like this:
├── include
│ └── my_api
│ ├── some
│ │ └── long
│ │ └── path
│ │ └── include
│ │ ├── header1.h
│ │ └── header2.h
│ └── other
│ └── very
│ └── long
│ └── path
│ └── include
│ ├── header3.h
│ └── header4.h
├── lib
│ └── libmy_api.a
├── CMakeLists.txt
└── main.cpp
I have followed a myriad of tutorials, but either CMake or Make does not build or I get "No such file or directory" when I include one of the headers in my main.cpp.
I'm by no means a CMake super user and I'm not even sure if it's possible just having a single CMakeLists.txt in root, handling everything, or whether it is good practice.
And to complicate things even further, header1.h depends on header3.h using this path:
#include "other/very/long/path/include/header3.h"
All help is appreciated - thanks!