diff options
author | Brad King <brad.king@kitware.com> | 2015-01-20 15:31:13 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-01-20 15:37:35 (GMT) |
commit | 27c6da933ec1dd4028bb80e4adf2fa7309ef4a04 (patch) | |
tree | 40aa45aa6a35d21a8788191a04adc9851deb80dc /Utilities | |
parent | 17cfa09eb2a78349a6471e4719bc933dd0625d9e (diff) | |
download | CMake-27c6da933ec1dd4028bb80e4adf2fa7309ef4a04.zip CMake-27c6da933ec1dd4028bb80e4adf2fa7309ef4a04.tar.gz CMake-27c6da933ec1dd4028bb80e4adf2fa7309ef4a04.tar.bz2 |
Add option to build CMake against a system jsoncpp
Create a CMAKE_USE_SYSTEM_JSONCPP option.
Diffstat (limited to 'Utilities')
-rw-r--r-- | Utilities/cmThirdParty.h.in | 1 | ||||
-rw-r--r-- | Utilities/cm_jsoncpp_reader.h | 7 | ||||
-rw-r--r-- | Utilities/cm_jsoncpp_value.h | 7 | ||||
-rw-r--r-- | Utilities/cm_jsoncpp_writer.h | 7 |
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 |