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

lielab: new package and v0.1.1 #23113

Merged
merged 11 commits into from
Jun 21, 2024
4 changes: 4 additions & 0 deletions recipes/lielab/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
sources:
"0.1.1":
url: "https://github.com/sandialabs/Lielab/archive/refs/tags/v0.1.1.tar.gz"
sha256: "04229c4c3bcaa9457c1c31f0f03c3f4e6f8aa79003a8b62d57301fd2d2165488"
60 changes: 60 additions & 0 deletions recipes/lielab/all/conanfile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
from conan import ConanFile
from conan.tools.cmake import CMakeToolchain, CMake
from conan.tools.files import copy, get, rmdir
import os

required_conan_version = ">=1.52.0"

class LielabConan(ConanFile):
name = "lielab"
url = "https://github.com/conan-io/conan-center-index"
homepage = "https://github.com/sandialabs/Lielab"
description = "Lielab is a C++ library for numerical Lie-theory: Lie groups," \
" Lie algebras, homogeneous manifolds, and various functions and algorithms" \
" on these spaces."
topics = ("Lie-theory", "Lie-group", "Lie-algebra", "numerical", "header-only")
package_type = "header-library"
license = "MIT"

settings = "os", "arch", "compiler", "build_type"

exports_sources = ("CMakeLists.txt",
"LICENSE",
"lielab/*")
msparapa marked this conversation as resolved.
Show resolved Hide resolved

no_copy_source = True

def requirements(self):
self.requires("eigen/3.4.0")

msparapa marked this conversation as resolved.
Show resolved Hide resolved
msparapa marked this conversation as resolved.
Show resolved Hide resolved
def source(self):
get(self, **self.conan_data["sources"][self.version],
destination=self.source_folder, strip_root=True)

def generate(self):
tc = CMakeToolchain(self)
tc.variables["LIELAB_INSTALL_LIBRARY"] = True
tc.variables["LIELAB_BUILD_TESTS"] = False
tc.variables["LIELAB_BUILD_PYTHON"] = False
tc.generate()

def package(self):
copy(self, "LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder)
cmake = CMake(self)
cmake.configure()
cmake.install()
rmdir(self, os.path.join(self.package_folder, "share"))

def package_info(self):
self.cpp_info.bindirs = []
self.cpp_info.libdirs = []

self.cpp_info.set_property("cmake_file_name", "Lielab")
self.cpp_info.set_property("cmake_target_name", "Lielab::Lielab")

self.cpp_info.names["cmake_find_package"] = "Lielab"
self.cpp_info.names["cmake_find_package_multi"] = "Lielab"

def package_id(self):
self.info.clear()

3 changes: 3 additions & 0 deletions recipes/lielab/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
versions:
"0.1.1":
folder: "all"
Loading