Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libigl] Always install as header-only library #14888

Merged
merged 4 commits into from
Feb 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ports/libigl/CONTROL
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Source: libigl
Version: 2.2.0
Port-Version: 3
Port-Version: 4
Homepage: https://github.com/libigl/libigl
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.
Build-Depends: eigen3
Expand All @@ -16,11 +16,11 @@ Build-Depends: opengl, glad

Feature: glfw
Description: Build with glfw
Build-Depends: libigl[opengl], glfw3
Build-Depends: libigl[core, opengl], glfw3

Feature: imgui
Description: Build with imgui
Build-Depends: libigl[glfw], imgui[glfw-binding, opengl3-glew-binding, libigl-imgui]
Build-Depends: libigl[core, glfw], imgui[core, glfw-binding, opengl3-glew-binding, libigl-imgui]

Feature: xml
Description: Build with libxml
Expand Down
26 changes: 3 additions & 23 deletions ports/libigl/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,6 @@ vcpkg_from_github(
fix-config.patch
)

set(LIBIGL_BUILD_STATIC OFF)
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
set(LIBIGL_BUILD_STATIC ON)
endif()

if ("test" IN_LIST FEATURES AND NOT EXISTS ${SOURCE_PATH}/tests/data)
set(TEST_SOURCE_PATH ${SOURCE_PATH}/tests/data)
file(MAKE_DIRECTORY ${TEST_SOURCE_PATH})
vcpkg_from_github(
OUT_SOURCE_PATH ${TEST_SOURCE_PATH}
REPO libigl/libigl-tests-data
REF 0689abc55bc12825e6c01ac77446f742839ff277
SHA512 2b6aec21ed39a9fd534da86fff75eee0f94a3ea2db2fb9dd28974636cc34936341cc28dfcf3bb07cf79409124342717e001c529dc887da72c85fe314b0eb6ea6
HEAD_REF master
)
endif()

vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
embree LIBIGL_WITH_EMBREE
opengl LIBIGL_WITH_OPENGL
Expand All @@ -46,7 +29,7 @@ vcpkg_configure_cmake(
OPTIONS ${FEATURE_OPTIONS}
-DLIBIGL_BUILD_PYTHON=OFF
-DLIBIGL_EXPORT_TARGETS=ON
-DLIBIGL_USE_STATIC_LIBRARY=${LIBIGL_BUILD_STATIC}
-DLIBIGL_USE_STATIC_LIBRARY=OFF # Header-only mode
-DLIBIGL_WITH_COMISO=OFF
-DLIBIGL_WITH_TETGEN=OFF
-DLIBIGL_WITH_TRIANGLE=OFF
Expand All @@ -62,10 +45,7 @@ vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH share/libigl/cmake)
vcpkg_copy_pdbs()

if (NOT LIBIGL_BUILD_STATIC)
# For dynamic build, libigl is a header-only library.
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug)
endif()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share)
# libigl is a header-only library.
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug)

file(INSTALL ${SOURCE_PATH}/LICENSE.GPL DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -3062,7 +3062,7 @@
},
"libigl": {
"baseline": "2.2.0",
"port-version": 3
"port-version": 4
},
"libilbc": {
"baseline": "3.0.3",
Expand Down
5 changes: 5 additions & 0 deletions versions/l-/libigl.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "d150e0cc468dec8769382b413a5c477a0682f1fd",
"version-string": "2.2.0",
"port-version": 4
},
{
"git-tree": "b953afc0875516000dd3c3e694b0d1fc788b8e19",
"version-string": "2.2.0",
Expand Down