getml / reflect-cpp

A C++20 library for fast serialization, deserialization and validation using reflection. Supports JSON, BSON, CBOR, flexbuffers, msgpack, TOML, XML, YAML / msgpack.org[C++20]
https://getml.github.io/reflect-cpp/
MIT License
821 stars 66 forks source link

Use BUILD_SHARED_LIBS as default value for REFLECTCPP_BUILD_SHARED #76

Closed hlewin closed 3 months ago

hlewin commented 3 months ago

BUILD_SHARED_LIBS is the standard cmake variable to indicate if output should be shared libraries, so this should be used to streamline standalone builds. To not break existing integrations and to make inclusion (eg as submodule) easier this patch leaves REFLECTCPP_BUILD_SHARED in place but default-initializes it with the value of BUILD_SHARED_LIBS.

liuzicheng1987 commented 3 months ago

Great input! Thanks for the contribution!