How can I add a header-only library outside the directory?
Previously I was using add_subdirectory(HEADERLIBRARY)
only when the directory HEADERLIBRARY
was inside the project directory. However, now I want to use the library for multiple projects, so I made a directory like this:
OUT
|----HEADERLIBRARY // of course contains CMakeLists.txt
|
|----project1
|----project2
|...
Is there a way to get the same effect as when I use add_subdirectory
?
EDIT : HEADERLIBRARY = https://github.com/taocpp/PEGTL/blob/master/doc/Installing-and-Using.md#add_subdirectory