[libigl] update to v2.4.0 (#27963)

* [libigl] update to 2.4.0

* update version

* update option and fix build error

* update version

* update patch

* update version

* update patch

* version

* use hunter eigen

* version

* use hunter dep

* vdb

* added a patch for updating the hunter version to the last available: resolves an issue when it was impossible to compile project on windows systems with MSVC 193+

* Update version database

* modified port version

* changed port version

* Update version database

* fix mpfr usage

* del version

* update version

* fixed wrong embree dependecy definition

* updated version

* removed not existing hunter packages

* formatted json

* updated version

* disabled hunter functionality completely. dependencies over vcpkg

* updated version

* fix typo, formatting

* updated version

* embree version

* updated versions/l-/libigl.json

* fixed gmp & mpfr linkage

* cleaned up the path file

* updated version

* patch cleanup, Eigen3 typo

* update version

* fixed dependend library naming, added static build capability

* updated version

* added tetgen, comiso and triangle as options

* autoformatted json

* updated version

* forgot options variable

* update version

* unused variables

* update version

* added upstream fix for static builds

* updated version

---------

Co-authored-by: FrankXie <v-frankxie@microsoft.com>
Co-authored-by: Frank <1433351828@qq.com>
Co-authored-by: Dimitrii Nikolaev <nikolaev@ift.at>
This commit is contained in:
Dimitrii Nikolaev 2023-03-28 18:53:10 +02:00 committed by GitHub
parent d1e2ff0c34
commit 3fce2d454c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 239 additions and 364 deletions

View File

@ -0,0 +1,120 @@
diff --git a/cmake/igl/modules/opengl.cmake b/cmake/igl/modules/opengl.cmake
index 4580c037..b09d762f 100644
--- a/cmake/igl/modules/opengl.cmake
+++ b/cmake/igl/modules/opengl.cmake
@@ -14,11 +14,10 @@ file(GLOB SRC_FILES "${libigl_SOURCE_DIR}/include/igl/opengl/*.cpp")
igl_target_sources(igl_opengl ${INC_FILES} ${SRC_FILES})
# 4. Dependencies
-include(glad)
find_package(OpenGL REQUIRED OPTIONAL_COMPONENTS OpenGL)
target_link_libraries(igl_opengl ${IGL_SCOPE}
igl::core
- glad::glad
+ glad
# Link against OpenGL::OpenGL if available, or fallback to OpenGL::GL
$<IF:$<TARGET_EXISTS:OpenGL::OpenGL>,OpenGL::OpenGL,OpenGL::GL>
)
diff --git a/cmake/igl/modules/core.cmake b/cmake/igl/modules/core.cmake
index 2aefcd64..137d30bc 100644
--- a/cmake/igl/modules/core.cmake
+++ b/cmake/igl/modules/core.cmake
@@ -20,7 +20,7 @@ igl_target_sources(igl_core ${INC_FILES} ${SRC_FILES})
igl_install(igl_core ${INC_FILES} ${SRC_FILES})
# 5. Dependencies
-include(eigen)
+find_package(Eigen3 CONFIG REQUIRED)
find_package(Threads REQUIRED)
target_link_libraries(igl_core ${IGL_SCOPE}
Eigen3::Eigen
diff --git a/cmake/igl/modules/embree.cmake b/cmake/igl/modules/embree.cmake
index 6f223192..21ce00e3 100644
--- a/cmake/igl/modules/embree.cmake
+++ b/cmake/igl/modules/embree.cmake
@@ -14,10 +14,10 @@ file(GLOB SRC_FILES "${libigl_SOURCE_DIR}/include/igl/embree/*.cpp")
igl_target_sources(igl_embree ${INC_FILES} ${SRC_FILES})
# 4. Dependencies
-include(embree)
+find_package(embree 3 CONFIG REQUIRED)
target_link_libraries(igl_embree ${IGL_SCOPE}
igl::core
- embree::embree
+ embree
)
# 5. Unit tests
diff --git a/cmake/igl/modules/glfw.cmake b/cmake/igl/modules/glfw.cmake
index 151338e4..77c48e58 100644
--- a/cmake/igl/modules/glfw.cmake
+++ b/cmake/igl/modules/glfw.cmake
@@ -14,10 +14,10 @@ file(GLOB SRC_FILES "${libigl_SOURCE_DIR}/include/igl/opengl/glfw/*.cpp")
igl_target_sources(igl_glfw ${INC_FILES} ${SRC_FILES})
# 4. Dependencies
-include(glfw)
+find_package(glfw3 CONFIG REQUIRED)
igl_include(opengl)
target_link_libraries(igl_glfw ${IGL_SCOPE}
igl::core
igl::opengl
- glfw::glfw
+ glfw
)
diff --git a/cmake/igl/modules/xml.cmake b/cmake/igl/modules/xml.cmake
index 3763b771..31ab979b 100644
--- a/cmake/igl/modules/xml.cmake
+++ b/cmake/igl/modules/xml.cmake
@@ -14,7 +14,7 @@ file(GLOB SRC_FILES "${libigl_SOURCE_DIR}/include/igl/xml/*.cpp")
igl_target_sources(igl_xml ${INC_FILES} ${SRC_FILES})
# 4. Dependencies
-include(tinyxml2)
+find_package(tinyxml2 CONFIG REQUIRED)
target_link_libraries(igl_xml ${IGL_SCOPE}
igl::core
tinyxml2::tinyxml2
diff --git a/cmake/igl/modules/imgui.cmake b/cmake/igl/modules/imgui.cmake
index d7ffb9d4..aac353aa 100644
--- a/cmake/igl/modules/imgui.cmake
+++ b/cmake/igl/modules/imgui.cmake
@@ -14,8 +14,8 @@ file(GLOB SRC_FILES "${libigl_SOURCE_DIR}/include/igl/opengl/glfw/imgui/*.cpp")
igl_target_sources(igl_imgui ${INC_FILES} ${SRC_FILES})
# 4. Dependencies
-include(imgui)
-include(imguizmo)
+find_package(imgui CONFIG REQUIRED)
+find_package(imguizmo CONFIG REQUIRED)
include(libigl_imgui_fonts)
igl_include(glfw)
target_link_libraries(igl_imgui ${IGL_SCOPE}
diff --git a/cmake/igl/modules/copyleft/cgal.cmake b/cmake/igl/modules/copyleft/cgal.cmake
index f6abe8c3..125dd701 100644
--- a/cmake/igl/modules/copyleft/cgal.cmake
+++ b/cmake/igl/modules/copyleft/cgal.cmake
@@ -14,13 +14,18 @@ file(GLOB SRC_FILES "${libigl_SOURCE_DIR}/include/igl/copyleft/cgal/*.cpp")
igl_target_sources(igl_copyleft_cgal ${INC_FILES} ${SRC_FILES})
# 4. Dependencies
-include(cgal)
+find_package(cgal CONFIG REQUIRED)
+find_package(PkgConfig REQUIRED)
+pkg_check_modules(gmp REQUIRED IMPORTED_TARGET gmp)
+target_link_libraries(igl_copyleft_cgal INTERFACE PkgConfig::gmp)
+pkg_check_modules(mpfr REQUIRED IMPORTED_TARGET mpfr)
+target_link_libraries(igl_copyleft_cgal INTERFACE PkgConfig::mpfr)
igl_include(copyleft core)
target_link_libraries(igl_copyleft_cgal ${IGL_SCOPE}
igl::core
igl_copyleft::core
- CGAL::CGAL
- CGAL::CGAL_Core
+ CGAL
+ CGAL_Core
)
# 5. Unit tests

View File

@ -1,28 +0,0 @@
diff --git a/cmake/libigl-config.cmake.in b/cmake/libigl-config.cmake.in
index 21aa2468..0aa6d8a0 100644
--- a/cmake/libigl-config.cmake.in
+++ b/cmake/libigl-config.cmake.in
@@ -27,5 +27,23 @@ if (TARGET igl::common)
endif()
endif()
+ include(CMakeFindDependencyMacro)
+if (TARGET igl::embree)
+ find_dependency(embree 3 CONFIG REQUIRED)
+endif()
+if (TARGET igl::xml)
+ find_dependency(tinyxml2 CONFIG REQUIRED)
+endif()
+if (TARGET igl::opengl)
+ find_dependency(OpenGL REQUIRED)
+ find_dependency(glad CONFIG REQUIRED)
+ if (TARGET igl::opengl_glfw)
+ find_dependency(glfw3 CONFIG REQUIRED)
+ if (TARGET igl::opengl_glfw_imgui)
+ find_dependency(imgui CONFIG REQUIRED)
+ endif()
+ endif()
+endif()
+
check_required_components(libigl)

View File

@ -1,213 +0,0 @@
diff --git a/cmake/LibiglWindows.cmake b/cmake/LibiglWindows.cmake
index b98aa55..46c68a7 100644
--- a/cmake/LibiglWindows.cmake
+++ b/cmake/LibiglWindows.cmake
@@ -1,4 +1,4 @@
-if(MSVC)
+if(0)
option(IGL_STATIC_RUNTIME "Use libigl with the static MSVC runtime." OFF)
if(IGL_STATIC_RUNTIME)
message(STATUS "MSVC -> forcing use of statically-linked runtime.")
diff --git a/cmake/libigl.cmake b/cmake/libigl.cmake
index 6de1b41..46ecbf0 100644
--- a/cmake/libigl.cmake
+++ b/cmake/libigl.cmake
@@ -107,7 +107,8 @@ if(HUNTER_ENABLED)
endif()
# Eigen
-if(NOT TARGET Eigen3::Eigen)
+find_package(Eigen3 CONFIG REQUIRED)
+if(0)
igl_download_eigen()
add_library(igl_eigen INTERFACE)
target_include_directories(igl_eigen SYSTEM INTERFACE
@@ -296,9 +297,9 @@ endif()
################################################################################
### Compile the embree part ###
if(LIBIGL_WITH_EMBREE)
- set(EMBREE_DIR "${LIBIGL_EXTERNAL}/embree")
+ find_package(embree 3 CONFIG REQUIRED)
- if(NOT TARGET embree)
+ if(0)
igl_download_embree()
# Note: On macOS, building embree as a static lib can only be done with a single ISA target.
@@ -317,8 +318,11 @@ if(LIBIGL_WITH_EMBREE)
compile_igl_module("embree")
target_link_libraries(igl_embree ${IGL_SCOPE} embree)
- target_include_directories(igl_embree ${IGL_SCOPE} ${EMBREE_DIR}/include)
- target_compile_definitions(igl_embree ${IGL_SCOPE} -DEMBREE_STATIC_LIB)
+ if(LIBIGL_USE_STATIC_LIBRARY)
+ find_package(TBB CONFIG REQUIRED)
+ target_link_libraries(igl_embree ${IGL_SCOPE} TBB::tbb)
+ target_compile_definitions(igl_embree ${IGL_SCOPE} -DEMBREE_STATIC_LIB)
+ endif()
endif()
################################################################################
@@ -359,11 +363,12 @@ if(LIBIGL_WITH_OPENGL)
endif()
# glad module
- if(NOT TARGET glad)
+ find_package(glad CONFIG REQUIRED)
+ if(0)
igl_download_glad()
add_subdirectory(${LIBIGL_EXTERNAL}/glad glad)
endif()
- target_link_libraries(igl_opengl ${IGL_SCOPE} glad)
+ target_link_libraries(igl_opengl ${IGL_SCOPE} glad::glad)
endif()
################################################################################
@@ -372,7 +377,8 @@ if(LIBIGL_WITH_OPENGL_GLFW)
if(TARGET igl::opengl)
# GLFW module
compile_igl_module("opengl/glfw")
- if(NOT TARGET glfw)
+ find_package(glfw3 CONFIG REQUIRED)
+ if(0)
igl_download_glfw()
option(GLFW_BUILD_EXAMPLES "Build the GLFW example programs" OFF)
option(GLFW_BUILD_TESTS "Build the GLFW test programs" OFF)
@@ -395,17 +401,19 @@ if(LIBIGL_WITH_OPENGL_GLFW_IMGUI)
if(TARGET igl::opengl_glfw)
# ImGui module
compile_igl_module("opengl/glfw/imgui")
- if(NOT TARGET imgui)
+ find_package(imgui CONFIG REQUIRED)
+ if(0)
igl_download_imgui()
add_subdirectory(${LIBIGL_EXTERNAL}/libigl-imgui imgui)
endif()
- if(NOT TARGET imguizmo)
+ find_package(imguizmo CONFIG REQUIRED)
+ if(0)
igl_download_imguizmo()
add_library(imguizmo ${LIBIGL_EXTERNAL}/imguizmo/ImGuizmo.cpp ${LIBIGL_EXTERNAL}/imguizmo/ImGuizmo.h)
target_compile_features(imguizmo PUBLIC cxx_std_11)
target_link_libraries(imguizmo PUBLIC imgui)
endif()
- target_link_libraries(igl_opengl_glfw_imgui ${IGL_SCOPE} igl_opengl_glfw imgui imguizmo)
+ target_link_libraries(igl_opengl_glfw_imgui ${IGL_SCOPE} igl_opengl_glfw imgui::imgui imguizmo::imguizmo)
endif()
endif()
@@ -415,12 +423,22 @@ if(LIBIGL_WITH_PNG)
# png/ module is anomalous because it also depends on opengl it really should
# be moved into the opengl/ directory and namespace ...
if(TARGET igl_opengl)
- if(NOT TARGET stb_image)
+ find_path(stb_include_dir stb.h)
+ find_package(opengl REQUIRED)
+ find_package(libpng CONFIG REQUIRED)
+ find_package(glad CONFIG REQUIRED)
+ if (BUILD_SHARED_LIBS)
+ set(libpng_LIBRARIES png)
+ else()
+ set(libpng_LIBRARIES png_static)
+ endif()
+ if(0)
igl_download_stb()
add_subdirectory(${LIBIGL_EXTERNAL}/stb stb_image)
endif()
compile_igl_module("png" "")
- target_link_libraries(igl_png ${IGL_SCOPE} igl_stb_image igl_opengl)
+ target_include_directories(igl_png INTERFACE ${stb_include_dir})
+ target_link_libraries(igl_png ${IGL_SCOPE} OpenGL::GL ${libpng_LIBRARIES} glad::glad)
endif()
endif()
@@ -468,7 +486,8 @@ endif()
### Compile the xml part ###
if(LIBIGL_WITH_XML)
set(TINYXML2_DIR "${LIBIGL_EXTERNAL}/tinyxml2")
- if(NOT TARGET tinyxml2)
+ find_package(tinyxml2 CONFIG REQUIRED)
+ if(0)
igl_download_tinyxml2()
add_library(tinyxml2 STATIC ${TINYXML2_DIR}/tinyxml2.cpp ${TINYXML2_DIR}/tinyxml2.h)
target_include_directories(tinyxml2 PUBLIC ${TINYXML2_DIR})
@@ -478,8 +497,7 @@ if(LIBIGL_WITH_XML)
SOVERSION "3")
endif()
compile_igl_module("xml")
- target_link_libraries(igl_xml ${IGL_SCOPE} tinyxml2)
- target_include_directories(igl_xml ${IGL_SCOPE} ${TINYXML2_DIR})
+ target_link_libraries(igl_xml ${IGL_SCOPE} tinyxml2::tinyxml2)
endif()
################################################################################
diff --git a/include/igl/opengl/glfw/imgui/ImGuiHelpers.h b/include/igl/opengl/glfw/imgui/ImGuiHelpers.h
index 0663390..f35f097 100644
--- a/include/igl/opengl/glfw/imgui/ImGuiHelpers.h
+++ b/include/igl/opengl/glfw/imgui/ImGuiHelpers.h
@@ -10,7 +10,7 @@
////////////////////////////////////////////////////////////////////////////////
#include "ImGuiTraits.h"
-#include <imgui/imgui.h>
+#include <imgui.h>
#include <vector>
#include <string>
#include <algorithm>
diff --git a/include/igl/opengl/glfw/imgui/ImGuiMenu.cpp b/include/igl/opengl/glfw/imgui/ImGuiMenu.cpp
index c91c1cc..0836142 100644
--- a/include/igl/opengl/glfw/imgui/ImGuiMenu.cpp
+++ b/include/igl/opengl/glfw/imgui/ImGuiMenu.cpp
@@ -9,7 +9,7 @@
#include "ImGuiMenu.h"
#include "ImGuiHelpers.h"
#include <igl/project.h>
-#include <imgui/imgui.h>
+#include <imgui.h>
#include <imgui_impl_glfw.h>
#include <imgui_impl_opengl3.h>
#include <imgui_fonts_droid_sans.h>
diff --git a/include/igl/opengl/glfw/imgui/ImGuiTraits.h b/include/igl/opengl/glfw/imgui/ImGuiTraits.h
index 7dae22a..e6911c5 100644
--- a/include/igl/opengl/glfw/imgui/ImGuiTraits.h
+++ b/include/igl/opengl/glfw/imgui/ImGuiTraits.h
@@ -8,7 +8,7 @@
#ifndef IGL_OPENGL_GLFW_IMGUI_IMGUITRAITS_H
#define IGL_OPENGL_GLFW_IMGUI_IMGUITRAITS_H
-#include <imgui/imgui.h>
+#include <imgui.h>
// Extend ImGui by populating its namespace directly
namespace ImGui
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 2410c19..a7659a3 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -15,12 +15,11 @@ igl_download_test_data()
set(IGL_TEST_DATA ${LIBIGL_EXTERNAL}/../tests/data)
### Download Catch2 unit test framework
-igl_download_catch2()
+find_package(Catch2 CONFIG REQUIRED)
list(APPEND CMAKE_MODULE_PATH ${LIBIGL_EXTERNAL}/catch2/contrib)
# Add catch2
-add_subdirectory(${LIBIGL_EXTERNAL}/catch2 catch2)
# Create test executable
diff --git a/tutorial/106_ViewerMenu/main.cpp b/tutorial/106_ViewerMenu/main.cpp
index a8e49d6..c7946f9 100644
--- a/tutorial/106_ViewerMenu/main.cpp
+++ b/tutorial/106_ViewerMenu/main.cpp
@@ -2,7 +2,7 @@
#include <igl/opengl/glfw/Viewer.h>
#include <igl/opengl/glfw/imgui/ImGuiMenu.h>
#include <igl/opengl/glfw/imgui/ImGuiHelpers.h>
-#include <imgui/imgui.h>
+#include <imgui.h>
#include <iostream>
#include "tutorial_shared_path.h"

View File

@ -1,90 +0,0 @@
diff --git a/cmake/libigl.cmake b/cmake/libigl.cmake
index a33cefa..0014375 100644
--- a/cmake/libigl.cmake
+++ b/cmake/libigl.cmake
@@ -560,6 +560,85 @@ export(
# Install headers for core library
install_dir_files(core)
install_dir_files(copyleft)
+
+if (LIBIGL_WITH_EMBREE)
+ install_dir_files(embree)
+# if(NOT LIBIGL_USE_STATIC_LIBRARY)
+ install(TARGETS igl_embree EXPORT igl-export)
+ export(TARGETS igl_embree
+ APPEND FILE libigl-export.cmake EXPORT_LINK_INTERFACE_LIBRARIES
+ )
+# endif()
+endif()
+
+if (LIBIGL_WITH_CGAL)
+ install_dir_files(copyleft/cgal)
+endif()
+
+if (LIBIGL_WITH_COMISO)
+ install_dir_files(copyleft/comiso)
+endif()
+
+if (LIBIGL_WITH_CORK)
+ install_dir_files(copyleft/cork)
+endif()
+
+if (LIBIGL_WITH_TETGEN)
+ install_dir_files(copyleft/tetgen)
+endif()
+
+if (LIBIGL_WITH_OPENGL OR LIBIGL_WITH_OPENGL_GLFW OR LIBIGL_WITH_OPENGL_GLFW_IMGUI)
+ install_dir_files(copyleft/opengl2)
+ install_dir_files(opengl)
+# if(NOT LIBIGL_USE_STATIC_LIBRARY)
+ install(TARGETS igl_opengl EXPORT igl-export)
+ export(TARGETS igl_opengl
+ APPEND FILE libigl-export.cmake EXPORT_LINK_INTERFACE_LIBRARIES
+ )
+# endif()
+endif()
+
+if (LIBIGL_WITH_OPENGL_GLFW OR LIBIGL_WITH_OPENGL_GLFW_IMGUI)
+ install_dir_files(opengl/glfw)
+# if(NOT LIBIGL_USE_STATIC_LIBRARY)
+ install(TARGETS igl_opengl_glfw EXPORT igl-export)
+ export(TARGETS igl_opengl_glfw
+ APPEND FILE libigl-export.cmake EXPORT_LINK_INTERFACE_LIBRARIES
+ )
+# endif()
+endif()
+
+if (LIBIGL_WITH_OPENGL_GLFW_IMGUI)
+ install_dir_files(opengl/glfw/imgui)
+# if(NOT LIBIGL_USE_STATIC_LIBRARY)
+ install(TARGETS igl_opengl_glfw_imgui EXPORT igl-export)
+ export(TARGETS igl_opengl_glfw_imgui
+ APPEND FILE libigl-export.cmake EXPORT_LINK_INTERFACE_LIBRARIES
+ )
+# endif()
+endif()
+
+if (LIBIGL_WITH_PNG)
+ install_dir_files(png)
+endif()
+
+if (LIBIGL_WITH_PREDICATES)
+ install_dir_files(predicates)
+endif()
+
+if (LIBIGL_WITH_TRIANGLE)
+ install_dir_files(triangle)
+endif()
+
+if (LIBIGL_WITH_XML)
+ install_dir_files(xml)
+# if(NOT LIBIGL_USE_STATIC_LIBRARY)
+ install(TARGETS igl_xml EXPORT igl-export)
+ export(TARGETS igl_xml
+ APPEND FILE libigl-export.cmake EXPORT_LINK_INTERFACE_LIBRARIES
+ )
+# endif()
+endif()
# Write package configuration file
configure_package_config_file(

View File

@ -1,52 +1,101 @@
# Header-only library
vcpkg_from_github( vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH OUT_SOURCE_PATH SOURCE_PATH
REPO libigl/libigl REPO libigl/libigl
REF e60423e28c86b6aa2a3f6eb0112e8fd881f96777 #2.3.0 REF 66b3ef2253e765d0ce0db74cec91bd706e5ba176 #2.4.0
SHA512 3fecb710825e58745c1d67eab694ee365a5b86151a5a1ca3758c1000c124059d38dbc78e8c6e941be6d85a716f928ed8fea42bb6007b8e24da0123332c2c96da SHA512 7014ffdaa160bfa2509fc283cb7176d7994a37f51509c7374659292efad076c8fb594f9f6990bab1aa5562d1f66e93403ea35a5bf2a924436560a2d4669ffcfd
HEAD_REF master HEAD_REF master
PATCHES PATCHES
fix-dependency.patch dependencies.patch
install-extra-headers.patch upstream_fixes.patch
fix-config.patch
) )
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES FEATURES
embree LIBIGL_WITH_EMBREE embree LIBIGL_EMBREE
opengl LIBIGL_WITH_OPENGL opengl LIBIGL_OPENGL
glfw LIBIGL_WITH_OPENGL_GLFW glfw LIBIGL_GLFW
imgui LIBIGL_WITH_OPENGL_GLFW_IMGUI imgui LIBIGL_IMGUI
#png LIBIGL_WITH_PNG # Disable this feature due to issue https://github.com/libigl/libigl/issues/1199 png LIBIGL_PNG
xml LIBIGL_WITH_XML xml LIBIGL_XML
#python LIBIGL_WITH_PYTHON # Python binding are in the process of being redone. cgal LIBIGL_COPYLEFT_CGAL
cgal LIBIGL_WITH_CGAL predicates LIBIGL_PREDICATES
comiso LIBIGL_COMISO
tetgen LIBIGL_TETGEN
triangle LIBIGL_TRIANGLE
) )
# External dependencies, which are not packaged by vcpkg
# COMISO
if(LIBIGL_COMISO)
vcpkg_from_github(
OUT_SOURCE_PATH COMISO_SOURCE_PATH
REPO libigl/CoMISo
REF 536440e714f412e7ef6c0b96b90ba37b1531bb39
SHA512 79824ea7f52dc6d59da491a9df763215285955ad2414c508368bcddd227adced72553476ede6d1ff95d4f0c3df8b4854d1d534dc7d2ab648b13c105f948ca2b3
HEAD_REF master
)
list(APPEND ADDITIONAL_OPTIONS "-DFETCHCONTENT_SOURCE_DIR_COMISO=${COMISO_SOURCE_PATH}")
endif()
# tetgen
if(LIBIGL_TETGEN)
vcpkg_from_github(
OUT_SOURCE_PATH TETGEN_SOURCE_PATH
REPO libigl/tetgen
REF 4f3bfba3997f20aa1f96cfaff604313a8c2c85b6
SHA512 d847cddd699df4ddca1743d328db8d9f193986f46df668683450b55331d701d6d1f4b9f8aa9d0097856892e3b21bdd5582a41d6ee37f2cf148eb31630e62258e
HEAD_REF master
)
list(APPEND ADDITIONAL_OPTIONS "-DFETCHCONTENT_SOURCE_DIR_TETGEN=${TETGEN_SOURCE_PATH}")
endif()
# triangle
if(LIBIGL_TRIANGLE)
include(FetchContent)
vcpkg_from_github(
OUT_SOURCE_PATH TRIANGLE_SOURCE_PATH
REPO libigl/triangle
REF 3ee6cac2230f0fe1413879574f741c7b6da11221
SHA512 f668836277585068324a208e0cc445ddda569e048ea99e9a77df1e0027e5efa38882c6fcccee242213adf24127db24d018d3b2eea227762eaab9e1b60292a6fd
HEAD_REF master
)
list(APPEND ADDITIONAL_OPTIONS "-DFETCHCONTENT_SOURCE_DIR_TRIANGLE=${TRIANGLE_SOURCE_PATH}")
endif()
# remove custom FindGMP and FildMPFR
file(REMOVE "${SOURCE_PATH}/cmake/find/FindGMP.cmake")
file(REMOVE "${SOURCE_PATH}/cmake/find/FindMPFR.cmake")
# static or dynamic build
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" LIBIGL_BUILD_STATIC)
vcpkg_cmake_configure( vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}" SOURCE_PATH "${SOURCE_PATH}"
DISABLE_PARALLEL_CONFIGURE DISABLE_PARALLEL_CONFIGURE
OPTIONS ${FEATURE_OPTIONS} OPTIONS ${FEATURE_OPTIONS}
-DLIBIGL_BUILD_PYTHON=OFF # Build options
-DLIBIGL_EXPORT_TARGETS=ON
-DLIBIGL_USE_STATIC_LIBRARY=OFF # Header-only mode
-DLIBIGL_WITH_COMISO=OFF
-DLIBIGL_WITH_TETGEN=OFF
-DLIBIGL_WITH_TRIANGLE=OFF
-DLIBIGL_WITH_PREDICATES=OFF
-DLIBIGL_BUILD_TUTORIALS=OFF
-DLIBIGL_WITH_PNG=OFF
-DLIBIGL_BUILD_TESTS=OFF -DLIBIGL_BUILD_TESTS=OFF
-DPYTHON_EXECUTABLE=${PYTHON2} -DLIBIGL_BUILD_TUTORIALS=OFF
-DLIBIGL_INSTALL=ON
-DLIBIGL_USE_STATIC_LIBRARY=${LIBIGL_BUILD_STATIC}
-DHUNTER_ENABLED=OFF
-DLIBIGL_COPYLEFT_COMISO=${LIBIGL_COMISO}
-DLIBIGL_COPYLEFT_TETGEN=${LIBIGL_TETGEN}
-DLIBIGL_RESTRICTED_TRIANGLE=${LIBIGL_TRIANGLE}
${ADDITIONAL_OPTIONS}
MAYBE_UNUSED_VARIABLES MAYBE_UNUSED_VARIABLES
PYTHON_EXECUTABLE LIBIGL_COMISO
LIBIGL_TETGEN
LIBIGL_TRIANGLE
) )
vcpkg_cmake_install() vcpkg_cmake_install()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/igl PACKAGE_NAME libigl)
vcpkg_cmake_config_fixup(CONFIG_PATH share/libigl/cmake)
vcpkg_copy_pdbs() vcpkg_copy_pdbs()
# libigl is a header-only library. # libigl is a header-only library.
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib")
file(INSTALL "${SOURCE_PATH}/LICENSE.GPL" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) file(INSTALL "${SOURCE_PATH}/LICENSE.GPL" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

View File

@ -0,0 +1,14 @@
diff --git "a/include/igl/average_from_edges_onto_vertices.cpp" "b/include/igl/average_from_edges_onto_vertices.cpp"
index 12c54c58..ed2951c1 100644
--- "a/include/igl/average_from_edges_onto_vertices.cpp"
+++ "b/include/igl/average_from_edges_onto_vertices.cpp"
@@ -62,7 +62,7 @@ igl::average_from_edges_onto_vertices(
#ifdef IGL_STATIC_LIBRARY
// Explicit template instantiation
-template void igl::average_from_edges_onto_vertices<Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::PartialReduxExpr<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::internal::member_norm<double>, 1>, Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::PartialReduxExpr<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::internal::member_norm<double>, 1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&);
+template void igl::average_from_edges_onto_vertices<Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, 1, 0, -1, 1>, Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&);
template void igl::average_from_edges_onto_vertices<Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&);
template void igl::average_from_edges_onto_vertices<Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, 1, 0, -1, 1>, Eigen::Matrix<double, -1, 1, 0, -1, 1> >(Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> >&);
-#endif
+#endif

View File

@ -1,13 +1,15 @@
{ {
"name": "libigl", "name": "libigl",
"version": "2.3.0", "version": "2.4.0",
"port-version": 2,
"description": "libigl is a simple C++ geometry processing library. We have a wide functionality including construction of sparse discrete differential geometry operators and finite-elements matrices such as the cotangent Laplacian and diagonalized mass matrix, simple facet and edge-based topology data structures, mesh-viewing utilities for OpenGL and GLSL, and many core functions for matrix manipulation which make Eigen feel a lot more like MATLAB.", "description": "libigl is a simple C++ geometry processing library. We have a wide functionality including construction of sparse discrete differential geometry operators and finite-elements matrices such as the cotangent Laplacian and diagonalized mass matrix, simple facet and edge-based topology data structures, mesh-viewing utilities for OpenGL and GLSL, and many core functions for matrix manipulation which make Eigen feel a lot more like MATLAB.",
"homepage": "https://github.com/libigl/libigl", "homepage": "https://github.com/libigl/libigl",
"license": "GPL-3.0-only", "license": "GPL-3.0-only",
"supports": "!(arm | uwp)", "supports": "!(arm | uwp)",
"dependencies": [ "dependencies": [
"eigen3", "eigen3",
"gmp",
"mpfr",
"pkgconf",
{ {
"name": "vcpkg-cmake", "name": "vcpkg-cmake",
"host": true "host": true
@ -21,13 +23,23 @@
"cgal": { "cgal": {
"description": "Build with cgal", "description": "Build with cgal",
"dependencies": [ "dependencies": [
"cgal" "cgal",
{
"name": "cgal",
"default-features": false
}
] ]
}, },
"comiso": {
"description": "Build with comiso"
},
"embree": { "embree": {
"description": "Build with embree", "description": "Build with embree",
"dependencies": [ "dependencies": [
"embree3" {
"name": "embree3",
"default-features": false
}
] ]
}, },
"glfw": { "glfw": {
@ -72,6 +84,12 @@
"opengl" "opengl"
] ]
}, },
"tetgen": {
"description": "Build with tetgen"
},
"triangle": {
"description": "Build with triangle"
},
"xml": { "xml": {
"description": "Build with libxml", "description": "Build with libxml",
"dependencies": [ "dependencies": [

View File

@ -4057,8 +4057,8 @@
"port-version": 2 "port-version": 2
}, },
"libigl": { "libigl": {
"baseline": "2.3.0", "baseline": "2.4.0",
"port-version": 2 "port-version": 0
}, },
"libilbc": { "libilbc": {
"baseline": "3.0.4", "baseline": "3.0.4",

View File

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "f3426c36bc18bb524834ef9f4482964a3d980fb9",
"version": "2.4.0",
"port-version": 0
},
{ {
"git-tree": "3fbdb4cb097785d6b9814e4a4ec89f8530a51c1a", "git-tree": "3fbdb4cb097785d6b9814e4a4ec89f8530a51c1a",
"version": "2.3.0", "version": "2.3.0",