diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index ebdc85bed5..0896b852ca 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -41,6 +41,7 @@ if (CMAKE_CXX_COMPILER_ID MATCHES Intel) endif() # Options +option(protobuf_INSTALL "Install protobuf binaries and files" ON) if(WITH_PROTOC) set(protobuf_PROTOC_EXE ${WITH_PROTOC} CACHE FILEPATH "Protocol Buffer Compiler executable" FORCE) endif() @@ -305,7 +306,9 @@ if (protobuf_BUILD_CONFORMANCE) include(conformance.cmake) endif (protobuf_BUILD_CONFORMANCE) -include(install.cmake) +if (protobuf_INSTALL) + include(install.cmake) +endif (protobuf_INSTALL) if (protobuf_BUILD_EXAMPLES) include(examples.cmake)