This populates directories ${CMAKE_BINARY_DIR}/_deps/gau2grid-src, etc. The generator on line 58 assumes that CMAKE_SOURCE_DIR and PROJECT_SOURCE_DIR are the same, which is not the case through FetchContent. Making this generator point explicitly to PROJECT_SOURCE_DIR fixes the problem.
A (albeit hacky) workaround of this is the following
Ideally,
gau2grid
could be included in a downstream CMake project asThis populates directories
${CMAKE_BINARY_DIR}/_deps/gau2grid-src
, etc. The generator on line 58 assumes thatCMAKE_SOURCE_DIR
andPROJECT_SOURCE_DIR
are the same, which is not the case through FetchContent. Making this generator point explicitly toPROJECT_SOURCE_DIR
fixes the problem.A (albeit hacky) workaround of this is the following