diff --git a/Documentation/doc/CMakeLists.txt b/Documentation/doc/CMakeLists.txt index b251731cafc..ecef25071c2 100644 --- a/Documentation/doc/CMakeLists.txt +++ b/Documentation/doc/CMakeLists.txt @@ -299,8 +299,8 @@ file(GLOB CGAL_DOXYGEN_RESOURCES_DIRS list(SORT CGAL_DOXYGEN_RESOURCES_DIRS COMPARE NATURAL) if(NOT CGAL_DOXYGEN_RESOURCES_DIRS STREQUAL CGAL_DOXYGEN_RESOURCES_VERSIONS) - message(FATAL "The directories in ${CGAL_DOC_RESOURCE_PREFIX_DIR} do not match the -expected versions: [${CGAL_DOXYGEN_RESOURCES_VERSIONS}] vs [${CGAL_DOXYGEN_RESOURCES_DIRS}]") + message(WARNING "The directories in ${CGAL_DOC_RESOURCE_PREFIX_DIR} do not match the expected versions:\n" + " [${CGAL_DOXYGEN_RESOURCES_DIRS}] vs [${CGAL_DOXYGEN_RESOURCES_VERSIONS}]") endif() function(CGAL_insert_in_sorted_list list_name value) @@ -312,14 +312,15 @@ function(CGAL_insert_in_sorted_list list_name value) set(${list_name} ${list} PARENT_SCOPE) endfunction() -if(DOXYGEN_VERSION IN_LIST CGAL_DOXYGEN_RESOURCES_VERSIONS) - list(FIND CGAL_DOXYGEN_RESOURCES_VERSIONS "${DOXYGEN_VERSION}" DOXYGEN_VERSION_INDEX) +if(DOXYGEN_VERSION IN_LIST CGAL_DOXYGEN_RESOURCES_DIRS) + list(FIND CGAL_DOXYGEN_RESOURCES_DIRS "${DOXYGEN_VERSION}" DOXYGEN_VERSION_INDEX) else() - CGAL_insert_in_sorted_list(CGAL_DOXYGEN_RESOURCES_VERSIONS ${DOXYGEN_VERSION}) - list(FIND CGAL_DOXYGEN_RESOURCES_VERSIONS ${DOXYGEN_VERSION} DOXYGEN_VERSION_INDEX) + CGAL_insert_in_sorted_list(CGAL_DOXYGEN_RESOURCES_DIRS ${DOXYGEN_VERSION}) + list(FIND CGAL_DOXYGEN_RESOURCES_DIRS ${DOXYGEN_VERSION} DOXYGEN_VERSION_INDEX) math(EXPR DOXYGEN_VERSION_INDEX "${DOXYGEN_VERSION_INDEX} - 1") endif() list(GET CGAL_DOXYGEN_RESOURCES_DIRS "${DOXYGEN_VERSION_INDEX}" CGAL_DOC_RESOURCE_DIR) + set(CGAL_DOC_RESOURCE_DIR "${CGAL_DOC_RESOURCE_PREFIX_DIR}/${CGAL_DOC_RESOURCE_DIR}") if(NOT EXISTS "${CGAL_DOC_RESOURCE_DIR}") message(FATAL_ERROR "Doxygen resources for version ${DOXYGEN_VERSION} not found")