aboutsummaryrefslogtreecommitdiff
path: root/ports/libigl/fix-config.patch
diff options
context:
space:
mode:
authorFabien Péan <fabien@pean.pro>2020-11-12 01:48:07 +0100
committerGitHub <noreply@github.com>2020-11-11 16:48:07 -0800
commit4b222f8d2653603b74fa5086cf0b02a1963d3911 (patch)
tree4cd4045ff485841645971227449f1a586f5d831a /ports/libigl/fix-config.patch
parent54d35841b4657604e52636e485926ef535737b49 (diff)
downloadvcpkg-4b222f8d2653603b74fa5086cf0b02a1963d3911.tar.gz
vcpkg-4b222f8d2653603b74fa5086cf0b02a1963d3911.zip
[libigl] Fix dynamic build and enable header-only mode (#14376)
* [libigl] Fix dynamic build and enable header-only mode * Update portfile.cmake Co-authored-by: Lily <47812810+LilyWangL@users.noreply.github.com>
Diffstat (limited to 'ports/libigl/fix-config.patch')
-rw-r--r--ports/libigl/fix-config.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/ports/libigl/fix-config.patch b/ports/libigl/fix-config.patch
new file mode 100644
index 000000000..523569b05
--- /dev/null
+++ b/ports/libigl/fix-config.patch
@@ -0,0 +1,28 @@
+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)
+