What happened is that as sc_builtin is a subdir of src, all the header of sc_builtin where copied twice (getopt.h, puff.h, etc...). So we don't need to specify subfolder, just copying src is sufficient.
cmake command install(DIRECTORY ... install all the directory content as asub-tree, preserving hierarchy.
Notice: cmake doc https://cmake.org/cmake/help/latest/command/install.html#installing-directories also recommend to switch to using FILE_SET to associate header to a target, so that headers get installed allong the corresponding target, which could be here libsc. This could be done later (need to check which version of cmake introduced FILE_SET feature).
Fix issue 105
What happened is that as sc_builtin is a subdir of src, all the header of sc_builtin where copied twice (getopt.h, puff.h, etc...). So we don't need to specify subfolder, just copying src is sufficient.
cmake command
install(DIRECTORY ...
install all the directory content as asub-tree, preserving hierarchy.Notice: cmake doc https://cmake.org/cmake/help/latest/command/install.html#installing-directories also recommend to switch to using FILE_SET to associate header to a target, so that headers get installed allong the corresponding target, which could be here libsc. This could be done later (need to check which version of cmake introduced FILE_SET feature).