about summary refs log tree commit diff
path: root/third_party/glog/glog-modules.cmake.in
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2020-05-27T00·26+0100
committerVincent Ambo <tazjin@google.com>2020-05-27T00·26+0100
commit6941048b7e55ec85ec257c4f597e7f0d54e1584d (patch)
tree35b90141e36142f5ebb5910fc0b08e0018e4486a /third_party/glog/glog-modules.cmake.in
parent7dc094173b641c78a449395cc6f28a5e52b6fe64 (diff)
parentafe04691aca3f669f517adaeb5bd4a87a481fb4a (diff)
merge(3p/glog): Vendor glog from commit 'afe04691' r/863
Diffstat (limited to 'third_party/glog/glog-modules.cmake.in')
-rw-r--r--third_party/glog/glog-modules.cmake.in18
1 files changed, 18 insertions, 0 deletions
diff --git a/third_party/glog/glog-modules.cmake.in b/third_party/glog/glog-modules.cmake.in
new file mode 100644
index 0000000000..71c516078c
--- /dev/null
+++ b/third_party/glog/glog-modules.cmake.in
@@ -0,0 +1,18 @@
+cmake_policy (PUSH)
+cmake_policy (SET CMP0057 NEW)
+
+if (CMAKE_VERSION VERSION_LESS 3.3)
+  message (FATAL_ERROR "glog-modules.cmake requires the consumer "
+    "to use CMake 3.3 (or newer)")
+endif (CMAKE_VERSION VERSION_LESS 3.3)
+
+set (glog_MODULE_PATH "@glog_FULL_CMake_DATADIR@")
+list (APPEND CMAKE_MODULE_PATH ${glog_MODULE_PATH})
+
+if (NOT glog_MODULE_PATH IN_LIST CMAKE_MODULE_PATH)
+  message (FATAL_ERROR "Cannot add '${glog_MODULE_PATH}' to "
+    "CMAKE_MODULE_PATH. This will cause glog-config.cmake to fail at "
+    "locating required find modules. Make sure CMAKE_MODULE_PATH is not a cache variable.")
+endif (NOT glog_MODULE_PATH IN_LIST CMAKE_MODULE_PATH)
+
+cmake_policy (POP)