Skip to content

Commit d245192

Browse files
Updated conan
1 parent 9b92025 commit d245192

2 files changed

Lines changed: 21 additions & 5 deletions

File tree

‎CMakeLists.txt‎

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,11 @@ if (REFLECTCPP_CSV)
255255
if (NOT TARGET Arrow)
256256
find_package(Arrow CONFIG REQUIRED)
257257
endif()
258-
target_link_libraries(reflectcpp PUBLIC "$<IF:$<BOOL:${ARROW_BUILD_STATIC}>,Arrow::arrow_static,Arrow::arrow_shared>")
258+
if (REFLECTCPP_USE_VCPKG)
259+
target_link_libraries(reflectcpp PUBLIC "$<IF:$<BOOL:${ARROW_BUILD_STATIC}>,Arrow::arrow_static,Arrow::arrow_shared>")
260+
else()
261+
target_link_libraries(reflectcpp PUBLIC "arrow::arrow")
262+
endif()
259263
endif ()
260264

261265
if (REFLECTCPP_FLEXBUFFERS)
@@ -282,11 +286,15 @@ if (REFLECTCPP_PARQUET)
282286
if (NOT TARGET Arrow)
283287
find_package(Arrow CONFIG REQUIRED)
284288
endif()
285-
if (NOT TARGET Parquet)
286-
find_package(Parquet CONFIG REQUIRED)
289+
if (REFLECTCPP_USE_VCPKG)
290+
if (NOT TARGET Parquet)
291+
find_package(Parquet CONFIG REQUIRED)
292+
endif()
293+
target_link_libraries(reflectcpp PUBLIC "$<IF:$<BOOL:${ARROW_BUILD_STATIC}>,Arrow::arrow_static,Arrow::arrow_shared>")
294+
target_link_libraries(reflectcpp PUBLIC "$<IF:$<BOOL:${ARROW_BUILD_STATIC}>,Parquet::parquet_static,Parquet::parquet_shared>")
295+
else()
296+
target_link_libraries(reflectcpp PUBLIC "arrow::arrow")
287297
endif()
288-
target_link_libraries(reflectcpp PUBLIC "$<IF:$<BOOL:${ARROW_BUILD_STATIC}>,Arrow::arrow_static,Arrow::arrow_shared>")
289-
target_link_libraries(reflectcpp PUBLIC "$<IF:$<BOOL:${ARROW_BUILD_STATIC}>,Parquet::parquet_static,Parquet::parquet_shared>")
290298
endif ()
291299

292300
if (REFLECTCPP_TOML)

‎conanfile.py‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,10 @@ class ReflectCppConan(ConanFile):
4040
"fPIC": [True, False],
4141
"with_capnproto": [True, False],
4242
"with_cbor": [True, False],
43+
"with_csv": [True, False],
4344
"with_flatbuffers": [True, False],
4445
"with_msgpack": [True, False],
46+
"with_parquet": [True, False],
4547
"with_toml": [True, False],
4648
"with_ubjson": [True, False],
4749
"with_xml": [True, False],
@@ -52,8 +54,10 @@ class ReflectCppConan(ConanFile):
5254
"fPIC": True,
5355
"with_capnproto": False,
5456
"with_cbor": False,
57+
"with_csv": False,
5558
"with_flatbuffers": False,
5659
"with_msgpack": False,
60+
"with_parquet": False,
5761
"with_toml": False,
5862
"with_ubjson": False,
5963
"with_xml": False,
@@ -75,6 +79,8 @@ def requirements(self):
7579
self.requires("capnproto/1.1.0", transitive_headers=True)
7680
if self.options.with_cbor or self.options.with_ubjson:
7781
self.requires("jsoncons/0.176.0", transitive_headers=True)
82+
if self.options.with_csv or self.options.with_parquet:
83+
self.requires("arrow/21.0.0", transitive_headers=True)
7884
if self.options.with_flatbuffers:
7985
self.requires("flatbuffers/24.3.25", transitive_headers=True)
8086
if self.options.with_msgpack:
@@ -110,8 +116,10 @@ def generate(self):
110116
tc.cache_variables["REFLECTCPP_USE_VCPKG"] = False
111117
tc.cache_variables["REFLECTCPP_CAPNPROTO"] = self.options.with_capnproto
112118
tc.cache_variables["REFLECTCPP_CBOR"] = self.options.with_cbor
119+
tc.cache_variables["REFLECTCPP_CSV"] = self.options.with_csv
113120
tc.cache_variables["REFLECTCPP_FLEXBUFFERS"] = self.options.with_flatbuffers
114121
tc.cache_variables["REFLECTCPP_MSGPACK"] = self.options.with_msgpack
122+
tc.cache_variables["REFLECTCPP_PARQUET"] = self.options.with_parquet
115123
tc.cache_variables["REFLECTCPP_TOML"] = self.options.with_toml
116124
tc.cache_variables["REFLECTCPP_XML"] = self.options.with_xml
117125
tc.cache_variables["REFLECTCPP_YAML"] = self.options.with_yaml

0 commit comments

Comments
 (0)