#CMake Project Help

2 messages · Page 1 of 1 (latest)

gilded estuary
#

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.

lavish torrentBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.