summaryrefslogtreecommitdiffstats
path: root/Utilities
diff options
context:
space:
mode:
Diffstat (limited to 'Utilities')
-rw-r--r--Utilities/cmThirdParty.h.in1
-rw-r--r--Utilities/cm_jsoncpp_reader.h7
-rw-r--r--Utilities/cm_jsoncpp_value.h7
-rw-r--r--Utilities/cm_jsoncpp_writer.h7
4 files changed, 19 insertions, 3 deletions
diff --git a/Utilities/cmThirdParty.h.in b/Utilities/cmThirdParty.h.in
index b883284..0cb6809 100644
--- a/Utilities/cmThirdParty.h.in
+++ b/Utilities/cmThirdParty.h.in
@@ -20,6 +20,7 @@
#cmakedefine CMAKE_USE_SYSTEM_LIBARCHIVE
#cmakedefine CMAKE_USE_SYSTEM_LIBLZMA
#cmakedefine CMAKE_USE_SYSTEM_FORM
+#cmakedefine CMAKE_USE_SYSTEM_JSONCPP
#cmakedefine CTEST_USE_XMLRPC
#endif
diff --git a/Utilities/cm_jsoncpp_reader.h b/Utilities/cm_jsoncpp_reader.h
index d7cb50e..22f2d81 100644
--- a/Utilities/cm_jsoncpp_reader.h
+++ b/Utilities/cm_jsoncpp_reader.h
@@ -13,6 +13,11 @@
#define cm_jsoncpp_reader_h
/* Use the jsoncpp library configured for CMake. */
-#include <cmjsoncpp/include/json/reader.h>
+#include "cmThirdParty.h"
+#ifdef CMAKE_USE_SYSTEM_JSONCPP
+# include <json/reader.h>
+#else
+# include <cmjsoncpp/include/json/reader.h>
+#endif
#endif
diff --git a/Utilities/cm_jsoncpp_value.h b/Utilities/cm_jsoncpp_value.h
index 15e1088..b4cf620 100644
--- a/Utilities/cm_jsoncpp_value.h
+++ b/Utilities/cm_jsoncpp_value.h
@@ -13,6 +13,11 @@
#define cm_jsoncpp_value_h
/* Use the jsoncpp library configured for CMake. */
-#include <cmjsoncpp/include/json/value.h>
+#include "cmThirdParty.h"
+#ifdef CMAKE_USE_SYSTEM_JSONCPP
+# include <json/value.h>
+#else
+# include <cmjsoncpp/include/json/value.h>
+#endif
#endif
diff --git a/Utilities/cm_jsoncpp_writer.h b/Utilities/cm_jsoncpp_writer.h
index c410369..c99a0d0 100644
--- a/Utilities/cm_jsoncpp_writer.h
+++ b/Utilities/cm_jsoncpp_writer.h
@@ -13,6 +13,11 @@
#define cm_jsoncpp_writer_h
/* Use the jsoncpp library configured for CMake. */
-#include <cmjsoncpp/include/json/writer.h>
+#include "cmThirdParty.h"
+#ifdef CMAKE_USE_SYSTEM_JSONCPP
+# include <json/writer.h>
+#else
+# include <cmjsoncpp/include/json/writer.h>
+#endif
#endif