CMake Error at /orthanc/Orthanc/Resources/CMake/JsonCppConfiguration.cmake:17 (DownloadPackage)

Hello,

It seems that the recent bug fix in file JsonCppConfiguration.cmake introduced a new problem in line 17.

https://bitbucket.org/sjodogne/orthanc/src/default/Resources/CMake/JsonCppConfiguration.cmake

build-error-2.jpg

Marco Barnig

Hello,

last night my brain was working, instead of dreaming, and came to the following findings:

  1. most of my problems are related to Orthanc source-code files recently modified

  2. it’s very unlikely that these files have errors because the Orthanc developers are running severe unit tests

  3. one of the last errors, which was reported during a cmake configuration, was a Mercurial message that there are uncommited changes

My brain concluded that the most probable reason of my development problems is a mismatch of source-code in my Docker Debian development container.
Docker image layers and cmake cache flags can sometimes be nasty.
Today I will create a new development container from scratch and restart my buildings.

I will keep you informed about the results.

Please forget my preceding message about the DownloadPackage.

best regards,

Marco Barnig

Hello

If I understand correctly, you are trying to build a (non-sample) plugin, right?

Could you make sure your CMakeLists.txt does include the DownloadPackage.cmake file ?

The sample plugins do that by first including …orthanc/Plugins/Samples/Common/OrthancPlugins.cmake

I just tried to build the ServeFolders plugin and it works fine.

Furthermore, I am not sure how the change Sébastien made could impact on the availability of DownloadPackage (he has simply changed the compiler flags between gcc and clang)

Could you please try to wipe out your build folder completely and start building from a fresh location ?

Thanks.

Hello,

Just a quick message to confirm Benjamin’s answer: Before including “JsonCppConfiguration.cmake”, you must include “DownloadPackage.cmake” (from the same folder).

Sébastien-