Files
product-vamp/conanfile.py
T
khodowany fe42d811fa
ci / checks (push) Successful in 42m54s
Formatting
2026-09-15 00:06:02 -05:00

101 lines
2.6 KiB
Python

import conan
import conan.tools.build
import conan.tools.cmake
class product_vamp_conan(conan.ConanFile):
name = "product-vamp"
version = "latest"
description = "Two-device sheet-music display and guitar remote"
license = "MIT"
package_type = "application"
settings = "os", "arch", "compiler", "build_type"
options = {
"with_tests": [
True,
False,
],
}
default_options = {
"with_tests": False,
}
python_requires = "modulus/latest"
exports = "modulus.json"
exports_sources = (
"CMakeLists.txt",
"modulus.py",
"modulus.json",
"cmake/*.cmake",
"data/*.json",
"data/**/*.json",
"data/*.xml",
"data/**/*.xml",
"tests/fixtures/*",
"tests/fixtures/**/*",
"generator/*.py",
"generator/**/*.py",
"include/*.hpp",
"include/vamp_style/*.hpp",
"include/vamp_pico/*.h",
"include/vamp_pico/capi/*.h",
"include/vamp_pico/*.hpp",
"include/vamp_protocol/*.hpp",
"include/vamp_zero/*.hpp",
"package/assets/*",
"package/assets/**/*",
"package/config/*.json",
"package/manifest.json.in",
"package/pico/*",
"package/scripts/*.py",
"package/scripts/*.sh",
"package/zero/*",
"src/vamp_style.cpp",
"src/vamp_pico/*.cpp",
"src/vamp_protocol/*.cpp",
"src/vamp_zero/*.cpp",
"tests/CMakeLists.txt",
"tests/*.cpp",
"tests/*.hpp",
"tests/*.py",
"tools/*.py",
"tools/requirements.txt",
)
def requirements(self):
self.requires(
str(self.python_requires["modulus"].ref),
transitive_headers=True,
transitive_libs=True,
options={
"with_openssl": True,
"with_sqlite": True,
"with_raylib": True,
},
)
for reference in (
"ligo/latest",
"noto/latest",
"luma/latest",
"sonus/latest",
):
self.requires(reference, transitive_headers=True, transitive_libs=True)
def generate(self):
dependencies = conan.tools.cmake.CMakeDeps(self)
dependencies.generate()
toolchain = conan.tools.cmake.CMakeToolchain(self)
if hasattr(toolchain, "user_presets_path"):
toolchain.user_presets_path = False
toolchain.variables["BUILD_TESTING"] = bool(self.options.with_tests)
toolchain.generate()
def build(self):
cmake = conan.tools.cmake.CMake(self)
cmake.configure()
cmake.build()
if self.options.with_tests and conan.tools.build.can_run(self):
cmake.test(target="check")
def package_id(self):
self.info.options.rm_safe("with_tests")
def package(self):
cmake = conan.tools.cmake.CMake(self)
cmake.install()
def package_info(self):
self.cpp_info.bindirs = ["zero/bin"]