Assume the following project tree for all of my questions:
some_project ├── another_library │ ├── CMakeLists.txt │ ├── include │ │ └── another_library │ │ └── another_library.hpp │ └── src │ └── another_library.cpp ├── app │ ├── CMakeLists.txt │ ├── include │ │ └── app │ └── src │ └── main.cpp ├── CMakeLists.txt └── library ├── CMakeLists.txt ├── include │ └── library │ └── library.hpp └── src └── library.cpp
Where app is an executable and depends on the shared object another_library and another_library depends on another shared object library.
Since another_library needs to include header files from library, is it ok for another_library/CMakeLists.txt to include the directories by using the following?
It feels a little wrong to be assuming things about where the top library folder is placed. Moving it to another location (in a subdirectory somewhere for example) would mean having to edit another_library/CMakeLists.txt to include the new location of library.
app is the executable, and I've seen a lot of people configure their executable directly in the top level CMakeLists.txt rather than doing it in app/CMakeListst.txt. What are the pros/cons of either technique?
How and were do I install resource files (such as images, config files, etc.)?