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
2 changes: 1 addition & 1 deletion .github/workflows/linux-conan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ jobs:
pipx install conan
conan profile detect
- name: Make sure the library compiles with Conan
run: conan build . --build=missing -s compiler.cppstd=gnu20 -o *:with_capnproto=True -o *:with_cbor=True -o *:with_flatbuffers=True -o *:with_msgpack=True -o *:with_toml=True -o *:with_ubjson=True -o *:with_xml=True -o *:with_yaml=True
run: conan build . --build=missing -s compiler.cppstd=gnu20 -o *:with_capnproto=True -o *:with_cbor=True -o *:with_csv=True -o *:with_flatbuffers=True -o *:with_msgpack=True -o *:with_parquet=True -o *:with_toml=True -o *:with_ubjson=True -o *:with_xml=True -o *:with_yaml=True

20 changes: 14 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ if (REFLECTCPP_USE_VCPKG)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake CACHE STRING "Vcpkg toolchain file")
endif ()

project(reflectcpp VERSION 0.20.0 LANGUAGES CXX)
project(reflectcpp VERSION 0.21.0 LANGUAGES CXX)

if (PROJECT_IS_TOP_LEVEL)
set(REFLECTCPP_INSTALL ON)
Expand Down Expand Up @@ -255,7 +255,11 @@ if (REFLECTCPP_CSV)
if (NOT TARGET Arrow)
find_package(Arrow CONFIG REQUIRED)
endif()
target_link_libraries(reflectcpp PUBLIC "$<IF:$<BOOL:${ARROW_BUILD_STATIC}>,Arrow::arrow_static,Arrow::arrow_shared>")
if (REFLECTCPP_USE_VCPKG)
target_link_libraries(reflectcpp PUBLIC "$<IF:$<BOOL:${ARROW_BUILD_STATIC}>,Arrow::arrow_static,Arrow::arrow_shared>")
else()
target_link_libraries(reflectcpp PUBLIC "arrow::arrow")
endif()
endif ()

if (REFLECTCPP_FLEXBUFFERS)
Expand All @@ -282,11 +286,15 @@ if (REFLECTCPP_PARQUET)
if (NOT TARGET Arrow)
find_package(Arrow CONFIG REQUIRED)
endif()
if (NOT TARGET Parquet)
find_package(Parquet CONFIG REQUIRED)
if (REFLECTCPP_USE_VCPKG)
if (NOT TARGET Parquet)
find_package(Parquet CONFIG REQUIRED)
endif()
target_link_libraries(reflectcpp PUBLIC "$<IF:$<BOOL:${ARROW_BUILD_STATIC}>,Arrow::arrow_static,Arrow::arrow_shared>")
target_link_libraries(reflectcpp PUBLIC "$<IF:$<BOOL:${ARROW_BUILD_STATIC}>,Parquet::parquet_static,Parquet::parquet_shared>")
else()
target_link_libraries(reflectcpp PUBLIC "arrow::arrow")
endif()
target_link_libraries(reflectcpp PUBLIC "$<IF:$<BOOL:${ARROW_BUILD_STATIC}>,Arrow::arrow_static,Arrow::arrow_shared>")
target_link_libraries(reflectcpp PUBLIC "$<IF:$<BOOL:${ARROW_BUILD_STATIC}>,Parquet::parquet_static,Parquet::parquet_shared>")
endif ()

if (REFLECTCPP_TOML)
Expand Down
8 changes: 8 additions & 0 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ class ReflectCppConan(ConanFile):
"fPIC": [True, False],
"with_capnproto": [True, False],
"with_cbor": [True, False],
"with_csv": [True, False],
"with_flatbuffers": [True, False],
"with_msgpack": [True, False],
"with_parquet": [True, False],
"with_toml": [True, False],
"with_ubjson": [True, False],
"with_xml": [True, False],
Expand All @@ -52,8 +54,10 @@ class ReflectCppConan(ConanFile):
"fPIC": True,
"with_capnproto": False,
"with_cbor": False,
"with_csv": False,
"with_flatbuffers": False,
"with_msgpack": False,
"with_parquet": False,
"with_toml": False,
"with_ubjson": False,
"with_xml": False,
Expand All @@ -75,6 +79,8 @@ def requirements(self):
self.requires("capnproto/1.1.0", transitive_headers=True)
if self.options.with_cbor or self.options.with_ubjson:
self.requires("jsoncons/0.176.0", transitive_headers=True)
if self.options.with_csv or self.options.with_parquet:
self.requires("arrow/21.0.0", transitive_headers=True)
if self.options.with_flatbuffers:
self.requires("flatbuffers/24.3.25", transitive_headers=True)
if self.options.with_msgpack:
Expand Down Expand Up @@ -110,8 +116,10 @@ def generate(self):
tc.cache_variables["REFLECTCPP_USE_VCPKG"] = False
tc.cache_variables["REFLECTCPP_CAPNPROTO"] = self.options.with_capnproto
tc.cache_variables["REFLECTCPP_CBOR"] = self.options.with_cbor
tc.cache_variables["REFLECTCPP_CSV"] = self.options.with_csv
tc.cache_variables["REFLECTCPP_FLEXBUFFERS"] = self.options.with_flatbuffers
tc.cache_variables["REFLECTCPP_MSGPACK"] = self.options.with_msgpack
tc.cache_variables["REFLECTCPP_PARQUET"] = self.options.with_parquet
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
Expand Down
17 changes: 0 additions & 17 deletions pyproject.toml

This file was deleted.

2 changes: 1 addition & 1 deletion vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "reflectcpp",
"version-string": "0.20.0",
"version-string": "0.21.0",
"dependencies": [
{
"name": "vcpkg-cmake"
Expand Down
Loading