Browse Source

Merge topic 'jsoncpp-version-header'

0330513c24 jsoncpp: Add cm3p/ header for json/version.h

Acked-by: Kitware Robot <[email protected]>
Acked-by: buildbot <[email protected]>
Merge-request: !10094
Brad King 1 year ago
parent
commit
c060f44657
2 changed files with 11 additions and 1 deletions
  1. 0 1
      Utilities/IWYU/mapping.imp
  2. 11 0
      Utilities/cm3p/json/version.h

+ 0 - 1
Utilities/IWYU/mapping.imp

@@ -59,7 +59,6 @@
   { include: [ "@<.*curl/system.h>", private, "<cm3p/curl/curl.h>", public ] },
   { include: [ "@<.*json/config.h>", private, "<cm3p/json/value.h>", public ] },
   { include: [ "@<.*json/forwards.h>", private, "<cm3p/json/value.h>", public ] },
-  { include: [ "@<.*json/version.h>", private, "<cm3p/json/value.h>", public ] },
   { include: [ "@<.*uv/.+\\.h>", private, "<cm3p/uv.h>", public ] },
   { include: [ "@<.*expat_external.h>", private, "<cm3p/expat.h>", public ] },
   { include: [ "@<.*zconf.h>", private, "<cm3p/zlib.h>", public ] },

+ 11 - 0
Utilities/cm3p/json/version.h

@@ -0,0 +1,11 @@
+/* Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
+   file Copyright.txt or https://cmake.org/licensing for details.  */
+#pragma once
+
+/* Use the jsoncpp library configured for CMake.  */
+#include "cmThirdParty.h"
+#ifdef CMAKE_USE_SYSTEM_JSONCPP
+#  include <json/version.h> // IWYU pragma: export
+#else
+#  include <cmjsoncpp/include/json/version.h> // IWYU pragma: export
+#endif