From 737b71b37a41e357b23bf312ddeffd41cabf9849 Mon Sep 17 00:00:00 2001 From: Alessandro Muntoni Date: Fri, 15 Dec 2023 17:03:21 +0100 Subject: [PATCH] fix cgal version to 5.6 --- src/external/cgal.cmake | 14 ++++++++------ src/external/e57.cmake | 8 +++++--- src/external/libigl.cmake | 8 +++++--- src/external/xerces.cmake | 3 ++- 4 files changed, 20 insertions(+), 13 deletions(-) diff --git a/src/external/cgal.cmake b/src/external/cgal.cmake index 48a1e0a56..f8c6930d3 100644 --- a/src/external/cgal.cmake +++ b/src/external/cgal.cmake @@ -5,15 +5,17 @@ option(MESHLAB_ALLOW_DOWNLOAD_SOURCE_CGAL "Allow download and use of CGAL source" ON) option(MESHLAB_ALLOW_SYSTEM_CGAL "Allow use of system-provided CGAL" ON) +set(CGAL_VER 5.6) + find_package(Threads REQUIRED) -find_package(CGAL) +find_package(CGAL ${CGAL_VER} QUIET) if(MESHLAB_ALLOW_SYSTEM_CGAL AND TARGET CGAL::CGAL) message(STATUS "- CGAL - using system-provided library") add_library(external-cgal INTERFACE) target_link_libraries(external-cgal INTERFACE CGAL::CGAL Threads::Threads) elseif(MESHLAB_ALLOW_DOWNLOAD_SOURCE_CGAL) - set(CGAL_DIR "${MESHLAB_EXTERNAL_DOWNLOAD_DIR}/CGAL-5.6") + set(CGAL_DIR "${MESHLAB_EXTERNAL_DOWNLOAD_DIR}/CGAL-${CGAL_VER}") set(CGAL_CHECK "${CGAL_DIR}/include/CGAL/version.h") set(CGAL_WIN_CHECK "${CGAL_DIR}/auxiliary/gmp/lib/libmpfr-4.lib") @@ -21,8 +23,8 @@ elseif(MESHLAB_ALLOW_DOWNLOAD_SOURCE_CGAL) if (NOT EXISTS ${CGAL_CHECK}) set(CGAL_LINK - https://github.com/CGAL/cgal/releases/download/v5.6/CGAL-5.6.zip - https://www.meshlab.net/data/libs/CGAL-5.6.zip + https://github.com/CGAL/cgal/releases/download/v${CGAL_VER}/CGAL-${CGAL_VER}.zip + https://www.meshlab.net/data/libs/CGAL-${CGAL_VER}.zip ) set(CGAL_MD5 6d1d067b88e20f7080d07d5108b4c772) download_and_unzip( @@ -38,8 +40,8 @@ elseif(MESHLAB_ALLOW_DOWNLOAD_SOURCE_CGAL) if (WIN32 AND NOT EXISTS ${CGAL_WIN_CHECK}) set(CGAL_AUX_LINK - https://github.com/CGAL/cgal/releases/download/v5.6/CGAL-5.6-win64-auxiliary-libraries-gmp-mpfr.zip - https://www.meshlab.net/data/libs/CGAL-5.6-win64-auxiliary-libraries-gmp-mpfr.zip + https://github.com/CGAL/cgal/releases/download/v${CGAL_VER}/CGAL-${CGAL_VER}-win64-auxiliary-libraries-gmp-mpfr.zip + https://www.meshlab.net/data/libs/CGAL-${CGAL_VER}-win64-auxiliary-libraries-gmp-mpfr.zip ) set(CGAL_AUX_MD5 247f4dca741c6b9a9be76286414070fa) download_and_unzip( diff --git a/src/external/e57.cmake b/src/external/e57.cmake index 6347caa08..0ed03da8c 100644 --- a/src/external/e57.cmake +++ b/src/external/e57.cmake @@ -4,15 +4,17 @@ option(MESHLAB_ALLOW_DOWNLOAD_SOURCE_LIBE57 "Allow download and use of libE57Format source" ON) +set(LIBE57_VER 2.3.0) + if (TARGET XercesC::XercesC) if(MESHLAB_ALLOW_DOWNLOAD_SOURCE_LIBE57) - set(LIBE57_DIR "${MESHLAB_EXTERNAL_DOWNLOAD_DIR}/libE57Format-2.3.0") + set(LIBE57_DIR "${MESHLAB_EXTERNAL_DOWNLOAD_DIR}/libE57Format-${LIBE57_VER}") set(LIBE57_CHECK "${LIBE57_DIR}/CMakeLists.txt") if (NOT EXISTS ${LIBE57_CHECK}) set(LIBE57_LINK - https://github.com/asmaloney/libE57Format/archive/refs/tags/v2.3.0.zip - https://www.meshlab.net/data/libs/libE57Format-2.3.0.zip) + https://github.com/asmaloney/libE57Format/archive/refs/tags/v${LIBE57_VER}.zip + https://www.meshlab.net/data/libs/libE57Format-${LIBE57_VER}.zip) set(LIBE57_MD5 958ada3883f9b60195f79bbab156f3e3) download_and_unzip( NAME "LibE57" diff --git a/src/external/libigl.cmake b/src/external/libigl.cmake index 352cc34c9..3666f375d 100644 --- a/src/external/libigl.cmake +++ b/src/external/libigl.cmake @@ -4,14 +4,16 @@ option(MESHLAB_ALLOW_DOWNLOAD_SOURCE_LIBIGL "Allow download and use of LibIGL source" ON) +set(LIBIGL_VER 2.4.0) + if(MESHLAB_ALLOW_DOWNLOAD_SOURCE_LIBIGL) - set(LIBIGL_DIR "${MESHLAB_EXTERNAL_DOWNLOAD_DIR}/libigl-2.4.0") + set(LIBIGL_DIR "${MESHLAB_EXTERNAL_DOWNLOAD_DIR}/libigl-${LIBIGL_VER}") set(LIBIGL_CHECK "${LIBIGL_DIR}/include/igl/igl_inline.h") if (NOT EXISTS ${LIBIGL_CHECK}) set(LIBIGL_LINK - https://github.com/libigl/libigl/archive/refs/tags/v2.4.0.zip - https://www.meshlab.net/data/libs/libigl-2.4.0.zip) + https://github.com/libigl/libigl/archive/refs/tags/v${LIBIGL_VER}.zip + https://www.meshlab.net/data/libs/libigl-${LIBIGL_VER}.zip) set(LIBIGL_MD5 0b4fea5dba2117b8db85c99a39a71f83) download_and_unzip( NAME "LibIGL" diff --git a/src/external/xerces.cmake b/src/external/xerces.cmake index 5a5e22208..e14720a83 100644 --- a/src/external/xerces.cmake +++ b/src/external/xerces.cmake @@ -5,6 +5,8 @@ option(MESHLAB_ALLOW_DOWNLOAD_SOURCE_XERCES "Allow download and use of Xerces-C sources" ON) option(MESHLAB_ALLOW_SYSTEM_XERCES "Allow use of system-provided Xerces-C" ON) +set(XERCES_C_VER 3.2.4) + find_package(XercesC) if(MESHLAB_ALLOW_SYSTEM_XERCES AND TARGET XercesC::XercesC) @@ -12,7 +14,6 @@ if(MESHLAB_ALLOW_SYSTEM_XERCES AND TARGET XercesC::XercesC) add_library(external-xerces INTERFACE) target_link_libraries(external-xerces INTERFACE XercesC::XercesC) elseif(MESHLAB_ALLOW_DOWNLOAD_SOURCE_XERCES) - set(XERCES_C_VER 3.2.4) set(XERCES_C_DIR "${MESHLAB_EXTERNAL_DOWNLOAD_DIR}/xerces-c-${XERCES_C_VER}") set(XERCES_C_CHECK "${XERCES_C_DIR}/CMakeLists.txt")