summaryrefslogtreecommitdiffstats
path: root/Utilities
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-12-18 14:57:55 (GMT)
committerBrad King <brad.king@kitware.com>2015-12-18 15:02:28 (GMT)
commita5dd0c9d427d66f7e361b0aa714a0a41b65ae4f0 (patch)
tree2b9b3b773b966be74081982c51d7684f93f49083 /Utilities
parent036b6ef7c47ccb19f291d2f36df37aaf885b4ba8 (diff)
downloadCMake-a5dd0c9d427d66f7e361b0aa714a0a41b65ae4f0.zip
CMake-a5dd0c9d427d66f7e361b0aa714a0a41b65ae4f0.tar.gz
CMake-a5dd0c9d427d66f7e361b0aa714a0a41b65ae4f0.tar.bz2
Add option to use a system-installed KWIML
Do not activate it with the general use-system-libs options for now because KWIML is not commonly distributed or available.
Diffstat (limited to 'Utilities')
-rw-r--r--Utilities/cmThirdParty.h.in1
-rw-r--r--Utilities/cm_kwiml.h11
-rw-r--r--Utilities/cmjsoncpp/CMakeLists.txt1
3 files changed, 11 insertions, 2 deletions
diff --git a/Utilities/cmThirdParty.h.in b/Utilities/cmThirdParty.h.in
index 0cb6809..4c1177c 100644
--- a/Utilities/cmThirdParty.h.in
+++ b/Utilities/cmThirdParty.h.in
@@ -15,6 +15,7 @@
/* Whether CMake is using its own utility libraries. */
#cmakedefine CMAKE_USE_SYSTEM_CURL
#cmakedefine CMAKE_USE_SYSTEM_EXPAT
+#cmakedefine CMAKE_USE_SYSTEM_KWIML
#cmakedefine CMAKE_USE_SYSTEM_ZLIB
#cmakedefine CMAKE_USE_SYSTEM_BZIP2
#cmakedefine CMAKE_USE_SYSTEM_LIBARCHIVE
diff --git a/Utilities/cm_kwiml.h b/Utilities/cm_kwiml.h
index 2e1a108..ab2b80b 100644
--- a/Utilities/cm_kwiml.h
+++ b/Utilities/cm_kwiml.h
@@ -12,7 +12,14 @@
#ifndef cm_kwiml_h
#define cm_kwiml_h
-#include "KWIML/include/kwiml/abi.h"
-#include "KWIML/include/kwiml/int.h"
+/* Use the KWIML library configured for CMake. */
+#include "cmThirdParty.h"
+#ifdef CMAKE_USE_SYSTEM_KWIML
+# include <kwiml/abi.h>
+# include <kwiml/int.h>
+#else
+# include "KWIML/include/kwiml/abi.h"
+# include "KWIML/include/kwiml/int.h"
+#endif
#endif
diff --git a/Utilities/cmjsoncpp/CMakeLists.txt b/Utilities/cmjsoncpp/CMakeLists.txt
index 1c863f8..d0114e7 100644
--- a/Utilities/cmjsoncpp/CMakeLists.txt
+++ b/Utilities/cmjsoncpp/CMakeLists.txt
@@ -23,3 +23,4 @@ include_directories(
)
add_library(cmjsoncpp ${JSONCPP_SOURCES})
+target_link_libraries(cmjsoncpp ${CMake_KWIML_LIBRARIES})