Skip to content
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
28 changes: 0 additions & 28 deletions .github/workflows/linux-conan.yaml

This file was deleted.

12 changes: 12 additions & 0 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class ReflectCppConan(ConanFile):
options = {
"shared": [True, False],
"fPIC": [True, False],
"with_boost_serialization": [True, False],
"with_capnproto": [True, False],
"with_cbor": [True, False],
"with_cereal": [True, False],
Expand All @@ -49,10 +50,12 @@ class ReflectCppConan(ConanFile):
"with_ubjson": [True, False],
"with_xml": [True, False],
"with_yaml": [True, False],
"with_yas": [True, False],
}
default_options = {
"shared": False,
"fPIC": True,
"with_boost_serialization": False,
"with_capnproto": False,
"with_cbor": False,
"with_cereal": False,
Expand All @@ -64,6 +67,7 @@ class ReflectCppConan(ConanFile):
"with_ubjson": False,
"with_xml": False,
"with_yaml": False,
"with_yas": False,
}

def config_options(self):
Expand All @@ -77,6 +81,8 @@ def configure(self):
def requirements(self):
self.requires("ctre/3.9.0", transitive_headers=True)
self.requires("yyjson/0.10.0", transitive_headers=True)
if self.options.with_boost_serialization:
self.requires("boost/1.90.0", transitive_headers=True)
Comment thread
liuzicheng1987 marked this conversation as resolved.
if self.options.with_capnproto:
self.requires("capnproto/1.1.0", transitive_headers=True)
if self.options.with_cbor or self.options.with_ubjson:
Expand All @@ -95,6 +101,8 @@ def requirements(self):
self.requires("pugixml/1.15", transitive_headers=True)
if self.options.with_yaml:
self.requires("yaml-cpp/0.8.0", transitive_headers=True)
if self.options.with_yas:
self.requires("yas/7.1.0", transitive_headers=True)

def build_requirements(self):
self.tool_requires("cmake/[>=3.23 <4]")
Expand All @@ -118,6 +126,9 @@ def generate(self):
tc.cache_variables["REFLECTCPP_BUILD_SHARED"] = self.options.shared
tc.cache_variables["REFLECTCPP_USE_BUNDLED_DEPENDENCIES"] = False
tc.cache_variables["REFLECTCPP_USE_VCPKG"] = False
tc.cache_variables["REFLECTCPP_BOOST_SERIALIZATION"] = (
self.options.with_boost_serialization
)
tc.cache_variables["REFLECTCPP_CAPNPROTO"] = self.options.with_capnproto
tc.cache_variables["REFLECTCPP_CBOR"] = self.options.with_cbor
tc.cache_variables["REFLECTCPP_CEREAL"] = self.options.with_cereal
Expand All @@ -128,6 +139,7 @@ def generate(self):
tc.cache_variables["REFLECTCPP_TOML"] = self.options.with_toml
tc.cache_variables["REFLECTCPP_XML"] = self.options.with_xml
tc.cache_variables["REFLECTCPP_YAML"] = self.options.with_yaml
tc.cache_variables["REFLECTCPP_YAS"] = self.options.with_yas
tc.generate()

def build(self):
Expand Down
14 changes: 7 additions & 7 deletions vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -179,20 +179,20 @@
}
]
},
"yas": {
"description": "Enable yas support",
"yaml": {
"description": "Enable YAML support",
"dependencies": [
{
"name": "yas"
"name": "yaml-cpp",
"version>=": "0.8.0#1"
}
]
},
"yaml": {
"description": "Enable YAML support",
"yas": {
"description": "Enable yas support",
"dependencies": [
{
"name": "yaml-cpp",
"version>=": "0.8.0#1"
"name": "yas"
}
]
}
Expand Down
Loading