I followed the tutorial steps where it shows linking to a subdirectory/library named “MathFunctions”. The CMakeLists.txt
in that subdirectory has:
# state that anybody linking to us needs to include the current source dir
# to find MathFunctions.h, while we don't.
target_include_directories(MathFunctions
INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}
)
I don’t have much experience with C++ project layout. Any recommendations on where to go to learn about the next steps? For example, I imagine that users of the “MathFunctions” might want to include things like this:
#include "MathFunctions/Stuff.h"
#include "MathFunctions/MoreStuff.h"
because as you get more files, you’d want to avoid name conflicts. I don’t know how that translates to directory structure or CMake commands. I don’t know if the library’s files would use the same include style, or drop the prefix:
#include "Stuff.h"