libblepp
libblepp copied to clipboard
Fix CMakeLists for usage as subdirectory in larger projects
When included via add_subdirectory(libblepp)
, the ${CMAKE_SOURCE_DIR}
variable refers to the root project, not libblepp. Also fixes clobbering anything else that was previously in the path.
Uh, quick note (I was randomly linked this for some thoughts) traditionally you aren't meant to take another project and add it as a subdirectory of your own (the only use would be to vendor the lib, and there's better, more standardized ways of doing that).
Usually it's compiled separately, then linked dynamically/statically, possibly needing a find_package()
call in your own cmakefile. If this project is on conan, the process can be automated to an extent with cmake-conan.