Hi Enrico, thanks for the great library!
I'm integrating Clothoids into a larger CMake project using FetchContent and ran into an issue where the submodule resolution fails during the configure step.
The problem stems from cmake_utils/CMakeLists-utilities.txt:134:
if (EXISTS "${CMAKE_SOURCE_DIR}/submodules/${MODULE_DIR}")
Because CMAKE_SOURCE_DIR always points to the top-level project root, it searches for submodules/ in the parent project rather than inside the Clothoids directory. This causes the build to fail with Neither quarticRootsFlocke nor quarticRootsFlocke exist in submodules when included via FetchContent or add_subdirectory.
Replacing ${CMAKE_SOURCE_DIR} with ${PROJECT_SOURCE_DIR} fixes the issue perfectly, as it correctly resolves to the directory where project(Clothoids) was declared.
I'm currently patching this on the fly using sed in my FetchContent block, but it would be awesome to get this fixed upstream so it's fully compatible with modern CMake dependency management out of the box.
Thanks!
Hi Enrico, thanks for the great library!
I'm integrating
Clothoidsinto a larger CMake project usingFetchContentand ran into an issue where the submodule resolution fails during the configure step.The problem stems from
cmake_utils/CMakeLists-utilities.txt:134:if (EXISTS "${CMAKE_SOURCE_DIR}/submodules/${MODULE_DIR}")Because
CMAKE_SOURCE_DIRalways points to the top-level project root, it searches forsubmodules/in the parent project rather than inside theClothoidsdirectory. This causes the build to fail withNeither quarticRootsFlocke nor quarticRootsFlocke exist in submoduleswhen included viaFetchContentoradd_subdirectory.Replacing
${CMAKE_SOURCE_DIR}with${PROJECT_SOURCE_DIR}fixes the issue perfectly, as it correctly resolves to the directory whereproject(Clothoids)was declared.I'm currently patching this on the fly using
sedin myFetchContentblock, but it would be awesome to get this fixed upstream so it's fully compatible with modern CMake dependency management out of the box.Thanks!