mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-24 19:07:50 +08:00
4b222f8d26
* [libigl] Fix dynamic build and enable header-only mode * Update portfile.cmake Co-authored-by: Lily <47812810+LilyWangL@users.noreply.github.com>
91 lines
2.4 KiB
Diff
91 lines
2.4 KiB
Diff
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(
|