diff options
author | Yangqing Jia <jiayq84@gmail.com> | 2017-11-13 15:15:39 -0800 |
---|---|---|
committer | Yangqing Jia <jiayq84@gmail.com> | 2017-11-13 15:15:39 -0800 |
commit | cba18efe1861d1fc1eecd6dc2af86fc1f0d9922f (patch) | |
tree | e19f6738c435534c1c975eabe2059e9db4e3fa37 /cmake/CMakeLists.txt | |
parent | d3537c24ffde7c28bd8a8abe576747613b8e3afc (diff) |
Allow one to omit building libprotoc and protoc binaries
Diffstat (limited to 'cmake/CMakeLists.txt')
-rw-r--r-- | cmake/CMakeLists.txt | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index f159f60e..2351392d 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -14,6 +14,7 @@ project(protobuf C CXX) # Options option(protobuf_BUILD_TESTS "Build tests" ON) option(protobuf_BUILD_EXAMPLES "Build examples" OFF) +option(protobuf_BUILD_PROTOC_BINARIES "Build libprotoc and protoc compiler" ON) if (BUILD_SHARED_LIBS) set(protobuf_BUILD_SHARED_LIBS_DEFAULT ON) else (BUILD_SHARED_LIBS) @@ -184,8 +185,10 @@ endif (protobuf_UNICODE) include(libprotobuf-lite.cmake) include(libprotobuf.cmake) -include(libprotoc.cmake) -include(protoc.cmake) +if (protobuf_BUILD_PROTOC_BINARIES) + include(libprotoc.cmake) + include(protoc.cmake) +endif (protobuf_BUILD_PROTOC_BINARIES) if (protobuf_BUILD_TESTS) include(tests.cmake) |