diff options
author | Konstantin Podsvirov <konstantin@podsvirov.pro> | 2016-06-01 17:00:08 +0300 |
---|---|---|
committer | Konstantin Podsvirov <konstantin@podsvirov.pro> | 2016-06-04 00:10:07 +0300 |
commit | 71556295ffe315be34ce70e1a6821860fb088f07 (patch) | |
tree | 2429940c0d78972693670df9aea755cf23ec9d59 /cmake/protobuf-config.cmake.in | |
parent | 20b532544fde1dff34429b52db95c3a96409b73c (diff) | |
download | protobuf-71556295ffe315be34ce70e1a6821860fb088f07.tar.gz protobuf-71556295ffe315be34ce70e1a6821860fb088f07.tar.bz2 protobuf-71556295ffe315be34ce70e1a6821860fb088f07.zip |
CMake project updates
A series of improvements:
- Improved Protobuf module compatibility (disabled by default);
- Hide advanced settings;
- Added build tree configuration;
- Added build of examples.
Diffstat (limited to 'cmake/protobuf-config.cmake.in')
-rw-r--r-- | cmake/protobuf-config.cmake.in | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/cmake/protobuf-config.cmake.in b/cmake/protobuf-config.cmake.in index f11796a4..37315510 100644 --- a/cmake/protobuf-config.cmake.in +++ b/cmake/protobuf-config.cmake.in @@ -1,19 +1,10 @@ -# Version info variables -set(PROTOBUF_VERSION "@protobuf_VERSION@") -set(PROTOBUF_VERSION_STRING "@protobuf_VERSION_STRING@") +# User options +include("${CMAKE_CURRENT_LIST_DIR}/protobuf-options.cmake") # Imported targets include("${CMAKE_CURRENT_LIST_DIR}/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") +if(protobuf_MODULE_COMPATIBLE) + include("${CMAKE_CURRENT_LIST_DIR}/protobuf-module.cmake") endif() |