Hi! I recently started using cmake to build my projects, but Im having a hard time designing the build system.
Here is my project structure:
Root
| CMakeLists.txt
| MyLibrary -> Static Lib
| | CMakeLists.txt
| | source
| | | ...
| | vendor
| | | glfw -> Static Lib
| | | | ...
| | | | CMakeLists.txt
| MyApp -> Exe
| | ...
| | CMakeLists.txt
So basically MyLibrary uses glfw and some other libraries that it links to which in the end all gets used by MyApp. But I want MyApp to be completely independant from glfw and all the other libraries that MyLibrary uses. At the moment if I try calling a glfw function inside of MyApp it doesn't through a linker error saying that the symbol cant be found. Its has if all the projects linked to MyLibrary, also link to all of MyLibrary's dependant libraries. Don't know if this is supposed to happen, but im just a little confused.