diff --git a/conception/Architecture_decision_records/Install_jsoncpp.md b/conception/Architecture_decision_records/Install_jsoncpp.md new file mode 100644 index 000000000..0ab347cf2 --- /dev/null +++ b/conception/Architecture_decision_records/Install_jsoncpp.md @@ -0,0 +1,25 @@ +# Decision record template by Michael Nygard + +This is the template +in [Documenting architecture decisions - Michael Nygard](http://thinkrelevance.com/blog/2011/11/15/documenting-architecture-decisions). +You can use [adr-tools](https://github.com/npryce/adr-tools) for managing the ADR files. + +In each ADR file, write these sections: + +# Install jsoncpp library with xpansion + +## Status: Accepted [28 Feb. 2024] + +## Context + +In the context of migrating from centOS7 to oracle linux8 it was observed that managing jsoncpp library installation on +target environment +can be difficult. + +## Decision + +Deliver jsoncpp library with xpansion package + +## Consequences + +jsoncpp does not need to be installed on the target system. No version conflict diff --git a/conception/Using_jsoncpp_cmake.md b/conception/Using_jsoncpp_cmake.md new file mode 100644 index 000000000..9583a5743 --- /dev/null +++ b/conception/Using_jsoncpp_cmake.md @@ -0,0 +1,13 @@ +# How to use jsoncpp in cmake [Feb. 2024] + +The jsoncpp library doesn't follow modern Cmake convention. + +Following the library documentation https://github.com/open-source-parsers/jsoncpp/wiki/Building we need to do: + +get_target_property(JSON_INC_PATH jsoncpp_lib INTERFACE_INCLUDE_DIRECTORIES) +include_directories(${JSON_INC_PATH}) +target_link_libraries(${PROJECT_NAME} jsoncpp_lib) + +We can at least use target_include_directories instead of include_directories but don't try to use find package or +namespaced targets. +Some issues are opened on jsoncpp repository but not worked on \ No newline at end of file diff --git a/src/cpp/helpers/CMakeLists.txt b/src/cpp/helpers/CMakeLists.txt index c950f28cf..f3e94f5e9 100644 --- a/src/cpp/helpers/CMakeLists.txt +++ b/src/cpp/helpers/CMakeLists.txt @@ -57,3 +57,8 @@ target_link_libraries (helpers Boost::boost Boost::program_options MINIZIP::minizip-ng ) + +install(FILES + $ + DESTINATION bin +)