aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmake/protobuf-config.cmake.in
diff options
context:
space:
mode:
authorGravatar Jisi Liu <jisi.liu@gmail.com>2015-08-21 11:42:27 -0700
committerGravatar Jisi Liu <jisi.liu@gmail.com>2015-08-21 11:44:49 -0700
commitc3bc155aceda36ecb01cde2367a3b427f2d7ce40 (patch)
tree195d74745dad40a57d49bf718f50c7751336a405 /cmake/protobuf-config.cmake.in
parentb0f661181d10bddc08e380992590a1cdd92be92b (diff)
parenteb65c69e14fb711208ad5111cb9672f00864bb6d (diff)
Merge branch 'master' of github.com:google/protobuf
Change-Id: If3fb07754a734bae610d95124528e073515ac525
Diffstat (limited to 'cmake/protobuf-config.cmake.in')
-rw-r--r--cmake/protobuf-config.cmake.in27
1 files changed, 27 insertions, 0 deletions
diff --git a/cmake/protobuf-config.cmake.in b/cmake/protobuf-config.cmake.in
new file mode 100644
index 00000000..51d715cf
--- /dev/null
+++ b/cmake/protobuf-config.cmake.in
@@ -0,0 +1,27 @@
+# Version info variables
+set(PROTOBUF_VERSION "@protobuf_VERSION@")
+set(PROTOBUF_VERSION_STRING "@protobuf_VERSION_STRING@")
+
+# Current dir
+get_filename_component(_PROTOBUF_PACKAGE_PREFIX
+ "${CMAKE_CURRENT_LIST_FILE}" PATH)
+
+# Imported targets
+include("${_PROTOBUF_PACKAGE_PREFIX}/protobuf-targets.cmake")
+
+# Compute the installation prefix relative to this file.
+get_filename_component(_PROTOBUF_IMPORT_PREFIX
+ "${_PROTOBUF_PACKAGE_PREFIX}" PATH)
+get_filename_component(_PROTOBUF_IMPORT_PREFIX
+ "${_PROTOBUF_IMPORT_PREFIX}" PATH)
+get_filename_component(_PROTOBUF_IMPORT_PREFIX
+ "${_PROTOBUF_IMPORT_PREFIX}" PATH)
+
+# CMake FindProtobuf module compatible file
+if(NOT DEFINED PROTOBUF_MODULE_COMPATIBLE OR "${PROTOBUF_MODULE_COMPATIBLE}")
+ include("${_PROTOBUF_PACKAGE_PREFIX}/protobuf-module.cmake")
+endif()
+
+# Cleanup temporary variables.
+set(_PROTOBUF_PACKAGE_PREFIX)
+set(_PROTOBUF_IMPORT_PREFIX)