In a build environment where the nlohmann_json header only library is installed outside of /usr/include or /usr/local/include (for instance when building with Conan), the headers cannot be found since the dependency is not specified in CMakeLists.txt.
I believe the following patch against 2.0.0 addresses this. Let me know if I should submit a PR or if you just want to grab the code from here.
diff --git src/rawtoaces_core/CMakeLists.txt src/rawtoaces_core/CMakeLists.txt
index d99dd79ac..bfda2778a 100644
--- src/rawtoaces_core/CMakeLists.txt
+++ src/rawtoaces_core/CMakeLists.txt
@@ -26,6 +26,8 @@
${RAWTOACES_CORE_LIB}
PUBLIC
Eigen3::Eigen
+ PRIVATE
+ nlohmann_json::nlohmann_json
)
if ( ${Ceres_VERSION_MAJOR} GREATER 1 )
diff --git tests/CMakeLists.txt tests/CMakeLists.txt
index d99dd79ac..bfda2778a 100644
--- tests/CMakeLists.txt
+++ tests/CMakeLists.txt
@@ -197,6 +197,8 @@
PUBLIC
${RAWTOACES_UTIL_LIB}
OpenImageIO::OpenImageIO
+ PRIVATE
+ nlohmann_json::nlohmann_json
)
setup_test_coverage(Test_ImageConverter)
In a build environment where the nlohmann_json header only library is installed outside of
/usr/includeor/usr/local/include(for instance when building with Conan), the headers cannot be found since the dependency is not specified inCMakeLists.txt.I believe the following patch against 2.0.0 addresses this. Let me know if I should submit a PR or if you just want to grab the code from here.