forked from eclipse-uprotocol/up-transport-zenoh-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconanfile.py
More file actions
65 lines (56 loc) · 2.02 KB
/
conanfile.py
File metadata and controls
65 lines (56 loc) · 2.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
from conan import ConanFile
from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout
from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rm, rmdir
import os
class UpClientZenoh(ConanFile):
name = "up-client-zenoh-cpp"
package_type = "library"
license = "Apache-2.0 license"
homepage = "https://github.com/eclipse-uprotocol"
url = "https://github.com/conan-io/conan-center-index"
description = "C++ uLink Library for zenoh transport"
topics = ("ulink client", "transport")
# Binary configuration
settings = "os", "compiler", "build_type", "arch"
options = {"shared": [True, False], "fPIC": [True, False]}
conan_version = None
generators = "CMakeDeps"
version = "0.1"
exports_sources = "CMakeLists.txt", "lib/*"
options = {
"shared": [True, False],
"fPIC": [True, False],
"build_testing": [True, False],
"build_unbundled": [True, False],
"build_cross_compiling": [True, False],
}
default_options = {
"shared": False,
"fPIC": False,
"build_testing": False,
"build_unbundled": False,
"build_cross_compiling": False,
}
# def configure(self):
# self.options["up-cpp"].shared = True
def requirements(self):
if self.options.build_unbundled:
self.requires("up-cpp/0.1.5.0-dev")
self.requires("zenohc/cci.20240213")
self.requires("protobuf/3.21.12" + ("@cross/cross" if self.options.build_cross_compiling else ""))
else:
self.requires("up-cpp/0.1")
self.requires("spdlog/1.13.0")
self.requires("protobuf/3.21.12")
def generate(self):
tc = CMakeToolchain(self)
tc.generate()
def build(self):
cmake = CMake(self)
cmake.configure()
cmake.build()
def package(self):
cmake = CMake(self)
cmake.install()
def package_info(self):
self.cpp_info.libs = ["up-client-zenoh-cpp"]