Skip to content

Commit

Permalink
fix cgal version to 5.6
Browse files Browse the repository at this point in the history
  • Loading branch information
alemuntoni committed Dec 15, 2023
1 parent 092c645 commit 737b71b
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 13 deletions.
14 changes: 8 additions & 6 deletions src/external/cgal.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,26 @@
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")

set(CGAL_DOWNLOAD_SUCCESS TRUE)

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(
Expand All @@ -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(
Expand Down
8 changes: 5 additions & 3 deletions src/external/e57.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
8 changes: 5 additions & 3 deletions src/external/libigl.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 2 additions & 1 deletion src/external/xerces.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@
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)
message(STATUS "- Xerces-C - using system-provided library")
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")

Expand Down

0 comments on commit 737b71b

Please sign in to comment.