libigl-core

[brief]

libigl's Core Module

libigl is a simple C++ geometry processing library separated into multiple modules that can be used either as header-only or as compiled version.

Official build2

Package cppget.org queue.cppget.org
libigl-core cppget.org queue.cppget.org
libigl-opengl cppget.org queue.cppget.org
libigl-glfw cppget.org queue.cppget.org
libigl-imgui cppget.org queue.cppget.org
libigl-png cppget.org queue.cppget.org

Usage

Currently, not all libigl packages can be found on cppget.org. It is recommend to add this Git repository itself instead as a prerequisite to your repositories.manifest to be able to fetch the up-to-date packages of all provided libigl modules.

:
role: prerequisite
location: https://github.com/build2-packaging/libigl.git

Otherwise, you will either have to add the stable or the alpha section of the cppget.org repository.

:
role: prerequisite
location: https://pkg.cppget.org/1/alpha
# trust: ...

Add the respective dependency in your project's manifest file to make the required packages available for import.

depends: libigl-core ^2.5.0-
depends: libigl-opengl ^2.5.0-
depends: libigl-glfw ^2.5.0-
depends: libigl-imgui ^2.5.0-
depends: libigl-png ^2.5.0-

All the packages export only static libraries. These can be imported by the following declarations in a buildfile.

import igl = libigl-core%liba{igl-core}
import igl = libigl-opengl%liba{igl-opengl}
import igl = libigl-glfw%liba{igl-glfw}
import igl = libigl-imgui%liba{igl-imgui}
import igl = libigl-png%liba{igl-png}

Furthermore, every library supports immediate importation to access its metadata for querying whether it has been compiled.

import! [metadata, rule_hint=cxx.link] igl = libigl-core%liba{igl-core}
header_only = [bool] $($igl: libigl_core.header_only)

Configuration

Header-Only Mode

config [bool] config.libigl_core.header_only ?= false
config [bool] config.libigl_opengl.header_only
config [bool] config.libigl_glfw.header_only
config [bool] config.libigl_imgui.header_only
config [bool] config.libigl_png.header_only

libigl supports header-only and compiled modes. For an explanation on why we support both modes, see this issue.

The default is to use the compiled libraries as the header-only mode is only useful for small test projects and can get quite intensive for CPU and memory when compiling. As of that, header-only mode should not be used for standard projects but only for small test builds. This is in contrast to the official upstream default that advertises libigl as header-only library.

Either all modules need to be used in header-only mode or all modules need to be compiled. Only config.libigl_core.header_only from the libigl-core package decides this. All other configuration variables are undefined on purpose. As soon as specifying their value, it will be traversed to dependent modules by dependency configuration negotiation. With this approach, the mode needs to be specified only for one single module package. If there are two specified inequal values, the negotiation will fail.

You should not state or require the compilation or header-only mode in the manifest of your package as it is an implementation detail that every configuration should decide for itself.

Issues and Notes

Unsupported Modules

core Module

opengl and glad Module

imgui Module

Tutorials

Contributing

Thanks in advance for your help and contribution to keep this project up-to-date. For now, please, file an issue on GitHub for everything that is not described below.

Recommend Updating Version

Please, file an issue on GitHub with the new recommended version.

Update Version by Pull Request

  1. Fork the repository on GitHub and clone it to your local machine.
  2. Run git submodule init and git submodule update to get the current upstream directory.
  3. Inside the upstream/libigl directory, checkout the new library version X.Y.Z by calling git checkout vX.Y.Z that you want to be packaged. Here, it is probably not a version but the newest commit from the master branch instead.
  4. If needed, change source files, buildfiles, and symbolic links accordingly to create a working build2 package. Make sure not to directly depend on the upstream directory inside the build system but use symbolic links instead.
  5. Update library version in manifest file if it has changed or add package update by using +n for the n-th update.
  6. Make an appropriate commit message by using imperative mood and a capital letter at the start and push the new commit to the master branch.
  7. Run bdep ci and test for errors.
  8. If everything works fine, make a pull request on GitHub and write down the bdep ci link to your CI tests.
  9. After a successful pull request, we will run the appropriate commands to publish a new package version.

Update Version Directly if You Have Permissions

  1. Inside the upstream/libigl directory, checkout the new library version X.Y.Z by calling git checkout vX.Y.Z that you want to be packaged. Here, it is probably not a version but the newest commit from the master branch instead.
  2. If needed, change source files, buildfiles, and symbolic links accordingly to create a working build2 package. Make sure not to directly depend on the upstream directory inside the build system but use symbolic links instead.
  3. Update library version in manifest file if it has changed or add package update by using +n for the n-th update.
  4. Make an appropriate commit message by using imperative mood and a capital letter at the start and push the new commit to the master branch.
  5. Run bdep ci and test for errors and warnings.
  6. When successful, run bdep release --tag --push to push new tag version to repository.
  7. Run bdep publish to publish the package to cppget.org.
license MPL-2.0 or GPL-3.0-or-later
project libigl
url libigl.github.io/
doc-url libigl.github.io/
src-url github.com/libigl/libigl
1 Version
version 2.5.0-a.1+3
repository https://pkg.cppget.org/1/alpha
depends 1; Eigen
reviews +1