HDF5Config.cmake - use CMAKE_SOURCE_DIR instead PROJECT_SOURCE_DIR

It doesn't really matter in this case - it matters really only for FindLibXml2, because `PROJECT_SOURCE_DIR` point to svgfill, when it's config executed, instead of `CMAKE_SOURCE_DIR` - so `CMAKE_SOURCE_DIR ` is never removed from the path, leading to cyclic calls. Adding for HDF5 too just for consistency.
This commit is contained in:
Andrej730
2025-11-19 19:34:59 +05:00
parent 12166ddbba
commit 158fe92644
+2 -2
View File
@@ -1,5 +1,5 @@
# To avoid cyclic calls to this file
list(REMOVE_ITEM CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR})
list(REMOVE_ITEM CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR})
if("${HDF5_INCLUDE_DIR}" STREQUAL "")
message(STATUS "No HDF5 include directory specified")
@@ -88,4 +88,4 @@ if(NOT HDF5_INCLUDE_DIR OR NOT HDF5_LIBRARY_DIR)
endif()
# Restore module path.
list(PREPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR})
list(PREPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR})