Projects using cglm as a header-only library needn’t build files under src/. Provide a target which allows them to skip compiling them by add_subdirectory(external/cglm EXCLUDE_FROM_ALL) target_link_libraries(MyExe PRIVATE cglm_headers)