sled/3party/protobuf-3.21.12/CMakeLists.txt

385 lines
13 KiB
CMake
Raw Normal View History

2024-03-13 18:11:02 +08:00
# Minimum CMake required
cmake_minimum_required(VERSION 3.5)
if(protobuf_VERBOSE)
message(STATUS "Protocol Buffers Configuring...")
endif()
# CMake policies
cmake_policy(SET CMP0022 NEW)
# On MacOS use @rpath/ for target's install name prefix path
2024-04-13 02:19:26 +08:00
if(POLICY CMP0042)
2024-03-13 18:11:02 +08:00
cmake_policy(SET CMP0042 NEW)
2024-04-13 02:19:26 +08:00
endif()
2024-03-13 18:11:02 +08:00
# Clear VERSION variables when no VERSION is given to project()
if(POLICY CMP0048)
cmake_policy(SET CMP0048 NEW)
endif()
# MSVC runtime library flags are selected by an abstraction.
if(POLICY CMP0091)
cmake_policy(SET CMP0091 NEW)
endif()
# Project
project(protobuf C CXX)
if(protobuf_DEPRECATED_CMAKE_SUBDIRECTORY_USAGE)
if(CMAKE_PROJECT_NAME STREQUAL "protobuf")
get_filename_component(CMAKE_SOURCE_DIR ${CMAKE_SOURCE_DIR} DIRECTORY)
endif()
2024-04-13 02:19:26 +08:00
get_filename_component(CMAKE_CURRENT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}
DIRECTORY)
2024-03-13 18:11:02 +08:00
get_filename_component(PROJECT_SOURCE_DIR ${PROJECT_SOURCE_DIR} DIRECTORY)
get_filename_component(protobuf_SOURCE_DIR ${protobuf_SOURCE_DIR} DIRECTORY)
endif()
# Add c++11 flags
2024-04-13 02:19:26 +08:00
if(CYGWIN)
2024-03-13 18:11:02 +08:00
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
else()
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
endif()
# The Intel compiler isn't able to deal with noinline member functions of
2024-04-13 02:19:26 +08:00
# template classes defined in headers. As such it spams the output with warning
# #2196: routine is both "inline" and "noinline" This silences that warning.
if(CMAKE_CXX_COMPILER_ID MATCHES Intel)
2024-03-13 18:11:02 +08:00
string(APPEND CMAKE_CXX_FLAGS " -diag-disable=2196")
endif()
# Options
option(protobuf_INSTALL "Install protobuf binaries and files" ON)
if(WITH_PROTOC)
2024-04-13 02:19:26 +08:00
set(protobuf_PROTOC_EXE
${WITH_PROTOC}
CACHE FILEPATH "Protocol Buffer Compiler executable" FORCE)
2024-03-13 18:11:02 +08:00
endif()
option(protobuf_BUILD_TESTS "Build tests" OFF)
option(protobuf_BUILD_CONFORMANCE "Build conformance tests" OFF)
option(protobuf_BUILD_EXAMPLES "Build examples" OFF)
2024-04-13 10:14:57 +08:00
option(protobuf_BUILD_PROTOC_BINARIES "Build libprotoc and protoc compiler" ON)
2024-03-13 18:11:02 +08:00
option(protobuf_BUILD_LIBPROTOC "Build libprotoc" OFF)
2024-04-13 02:19:26 +08:00
option(protobuf_DISABLE_RTTI "Remove runtime type information in the binaries"
OFF)
if(BUILD_SHARED_LIBS)
2024-03-13 18:11:02 +08:00
set(protobuf_BUILD_SHARED_LIBS_DEFAULT ON)
2024-04-13 02:19:26 +08:00
else(BUILD_SHARED_LIBS)
2024-03-13 18:11:02 +08:00
set(protobuf_BUILD_SHARED_LIBS_DEFAULT OFF)
2024-04-13 02:19:26 +08:00
endif(BUILD_SHARED_LIBS)
option(protobuf_BUILD_SHARED_LIBS "Build Shared Libraries"
${protobuf_BUILD_SHARED_LIBS_DEFAULT})
2024-03-13 18:11:02 +08:00
include(CMakeDependentOption)
2024-04-13 02:19:26 +08:00
cmake_dependent_option(
protobuf_MSVC_STATIC_RUNTIME "Link static runtime libraries" ON
2024-03-13 18:11:02 +08:00
"NOT protobuf_BUILD_SHARED_LIBS" OFF)
2024-03-20 16:31:07 +08:00
set(protobuf_WITH_ZLIB_DEFAULT OFF)
2024-04-13 02:19:26 +08:00
option(protobuf_WITH_ZLIB "Build with zlib support"
${protobuf_WITH_ZLIB_DEFAULT})
set(protobuf_DEBUG_POSTFIX
"d"
CACHE STRING "Default debug postfix")
2024-03-13 18:11:02 +08:00
mark_as_advanced(protobuf_DEBUG_POSTFIX)
# User options
include(${protobuf_SOURCE_DIR}/cmake/protobuf-options.cmake)
# Overrides for option dependencies
2024-04-13 02:19:26 +08:00
if(protobuf_BUILD_PROTOC_BINARIES OR protobuf_BUILD_TESTS)
2024-03-13 18:11:02 +08:00
set(protobuf_BUILD_LIBPROTOC ON)
2024-04-13 02:19:26 +08:00
endif()
2024-03-13 18:11:02 +08:00
# Path to main configure script
set(protobuf_CONFIGURE_SCRIPT "${protobuf_SOURCE_DIR}/configure.ac")
# Parse configure script
set(protobuf_AC_INIT_REGEX
2024-04-13 02:19:26 +08:00
"^AC_INIT\\(\\[([^]]+)\\],\\[([^]]+)\\],\\[([^]]+)\\],\\[([^]]+)\\]\\)$")
file(
STRINGS "${protobuf_CONFIGURE_SCRIPT}" protobuf_AC_INIT_LINE
LIMIT_COUNT 1
REGEX "^AC_INIT")
2024-03-13 18:11:02 +08:00
# Description
2024-04-13 02:19:26 +08:00
string(REGEX REPLACE "${protobuf_AC_INIT_REGEX}" "\\1" protobuf_DESCRIPTION
"${protobuf_AC_INIT_LINE}")
2024-03-13 18:11:02 +08:00
# Version
2024-04-13 02:19:26 +08:00
string(REGEX REPLACE "${protobuf_AC_INIT_REGEX}" "\\2" protobuf_VERSION_STRING
"${protobuf_AC_INIT_LINE}")
2024-03-13 18:11:02 +08:00
# Contact
2024-04-13 02:19:26 +08:00
string(REGEX REPLACE "${protobuf_AC_INIT_REGEX}" "\\3" protobuf_CONTACT
"${protobuf_AC_INIT_LINE}")
2024-03-13 18:11:02 +08:00
# Parse version tweaks
2024-04-13 02:19:26 +08:00
set(protobuf_VERSION_REGEX
"^([0-9]+)\\.([0-9]+)\\.([0-9]+)([-]rc[-]|\\.)?([0-9]*)$")
string(REGEX REPLACE "${protobuf_VERSION_REGEX}" "\\1" protobuf_VERSION_MAJOR
"${protobuf_VERSION_STRING}")
string(REGEX REPLACE "${protobuf_VERSION_REGEX}" "\\2" protobuf_VERSION_MINOR
"${protobuf_VERSION_STRING}")
string(REGEX REPLACE "${protobuf_VERSION_REGEX}" "\\3" protobuf_VERSION_PATCH
"${protobuf_VERSION_STRING}")
string(REGEX REPLACE "${protobuf_VERSION_REGEX}" "\\5"
protobuf_VERSION_PRERELEASE "${protobuf_VERSION_STRING}")
2024-03-13 18:11:02 +08:00
message(STATUS "${protobuf_VERSION_PRERELEASE}")
# Package version
set(protobuf_VERSION
2024-04-13 02:19:26 +08:00
"${protobuf_VERSION_MAJOR}.${protobuf_VERSION_MINOR}.${protobuf_VERSION_PATCH}"
)
2024-03-13 18:11:02 +08:00
if(protobuf_VERSION_PRERELEASE)
set(protobuf_VERSION "${protobuf_VERSION}.${protobuf_VERSION_PRERELEASE}")
else()
set(protobuf_VERSION "${protobuf_VERSION}.0")
endif()
message(STATUS "${protobuf_VERSION}")
if(protobuf_VERBOSE)
message(STATUS "Configuration script parsing status [")
message(STATUS " Description : ${protobuf_DESCRIPTION}")
2024-04-13 02:19:26 +08:00
message(
STATUS " Version : ${protobuf_VERSION} (${protobuf_VERSION_STRING})")
2024-03-13 18:11:02 +08:00
message(STATUS " Contact : ${protobuf_CONTACT}")
message(STATUS "]")
endif()
add_definitions(-DGOOGLE_PROTOBUF_CMAKE_BUILD)
2024-04-13 02:19:26 +08:00
if(protobuf_DISABLE_RTTI)
2024-03-13 18:11:02 +08:00
add_definitions(-DGOOGLE_PROTOBUF_NO_RTTI=1)
endif()
2024-04-13 02:19:26 +08:00
file(
WRITE ${CMAKE_CURRENT_BINARY_DIR}/cmaketest.map
"{
2024-03-13 18:11:02 +08:00
global:
main;
local:
*;
};")
# CheckLinkerFlag module available in CMake >=3.18.
if(${CMAKE_VERSION} VERSION_GREATER 3.18 OR ${CMAKE_VERSION} VERSION_EQUAL 3.18)
include(CheckLinkerFlag)
2024-04-13 02:19:26 +08:00
check_linker_flag(
CXX -Wl,--version-script=${CMAKE_CURRENT_BINARY_DIR}/cmaketest.map
protobuf_HAVE_LD_VERSION_SCRIPT)
2024-03-13 18:11:02 +08:00
else()
include(CheckCXXSourceCompiles)
set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
2024-04-13 02:19:26 +08:00
set(CMAKE_REQUIRED_FLAGS
${CMAKE_REQUIRED_FLAGS}
-Wl,--version-script=${CMAKE_CURRENT_BINARY_DIR}/cmaketest.map)
check_cxx_source_compiles(
"
2024-03-13 18:11:02 +08:00
int main() {
return 0;
}
2024-04-13 02:19:26 +08:00
"
protobuf_HAVE_LD_VERSION_SCRIPT)
2024-03-13 18:11:02 +08:00
set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS})
endif()
file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/cmaketest.map)
find_package(Threads REQUIRED)
set(_protobuf_FIND_ZLIB)
2024-04-13 02:19:26 +08:00
if(protobuf_WITH_ZLIB)
2024-03-13 18:11:02 +08:00
find_package(ZLIB)
2024-04-13 02:19:26 +08:00
if(ZLIB_FOUND)
2024-03-13 18:11:02 +08:00
set(HAVE_ZLIB 1)
2024-04-13 02:19:26 +08:00
# FindZLIB module define ZLIB_INCLUDE_DIRS variable Set
# ZLIB_INCLUDE_DIRECTORIES for compatible
set(ZLIB_INCLUDE_DIRECTORIES ${ZLIB_INCLUDE_DIRECTORIES}
${ZLIB_INCLUDE_DIRS})
2024-03-13 18:11:02 +08:00
# Using imported target if exists
2024-04-13 02:19:26 +08:00
if(TARGET ZLIB::ZLIB)
2024-03-13 18:11:02 +08:00
set(ZLIB_LIBRARIES ZLIB::ZLIB)
2024-04-13 02:19:26 +08:00
set(_protobuf_FIND_ZLIB
"if(NOT ZLIB_FOUND)\n find_package(ZLIB)\nendif()")
endif(TARGET ZLIB::ZLIB)
else(ZLIB_FOUND)
2024-03-13 18:11:02 +08:00
set(HAVE_ZLIB 0)
# Explicitly set these to empty (override NOT_FOUND) so cmake doesn't
# complain when we use them later.
set(ZLIB_INCLUDE_DIRECTORIES)
set(ZLIB_LIBRARIES)
2024-04-13 02:19:26 +08:00
endif(ZLIB_FOUND)
endif(protobuf_WITH_ZLIB)
2024-03-13 18:11:02 +08:00
2024-04-13 02:19:26 +08:00
if(HAVE_ZLIB)
2024-03-13 18:11:02 +08:00
add_definitions(-DHAVE_ZLIB)
2024-04-13 02:19:26 +08:00
endif(HAVE_ZLIB)
2024-03-13 18:11:02 +08:00
# We need to link with libatomic on systems that do not have builtin atomics, or
# don't have builtin support for 8 byte atomics
set(protobuf_LINK_LIBATOMIC false)
2024-04-13 02:19:26 +08:00
if(NOT MSVC)
2024-03-13 18:11:02 +08:00
include(CheckCXXSourceCompiles)
set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS} -std=c++11)
2024-04-13 02:19:26 +08:00
check_cxx_source_compiles(
"
2024-03-13 18:11:02 +08:00
#include <atomic>
int main() {
return std::atomic<int64_t>{};
}
2024-04-13 02:19:26 +08:00
"
protobuf_HAVE_BUILTIN_ATOMICS)
if(NOT protobuf_HAVE_BUILTIN_ATOMICS)
2024-03-13 18:11:02 +08:00
set(protobuf_LINK_LIBATOMIC true)
2024-04-13 02:19:26 +08:00
endif(NOT protobuf_HAVE_BUILTIN_ATOMICS)
2024-03-13 18:11:02 +08:00
set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS})
2024-04-13 02:19:26 +08:00
endif(NOT MSVC)
2024-03-13 18:11:02 +08:00
2024-04-13 02:19:26 +08:00
if(protobuf_BUILD_SHARED_LIBS)
2024-03-13 18:11:02 +08:00
set(protobuf_SHARED_OR_STATIC "SHARED")
2024-04-13 02:19:26 +08:00
else(protobuf_BUILD_SHARED_LIBS)
2024-03-13 18:11:02 +08:00
set(protobuf_SHARED_OR_STATIC "STATIC")
2024-04-13 02:19:26 +08:00
# The CMAKE_<LANG>_FLAGS(_<BUILD_TYPE>)? is meant to be user controlled. Prior
# to CMake 3.15, the MSVC runtime library was pushed into the same flags
2024-03-13 18:11:02 +08:00
# making programmatic control difficult. Prefer the functionality in newer
# CMake versions when available.
2024-04-13 02:19:26 +08:00
if(${CMAKE_VERSION} VERSION_GREATER 3.15 OR ${CMAKE_VERSION} VERSION_EQUAL
3.15)
if(protobuf_MSVC_STATIC_RUNTIME)
set(CMAKE_MSVC_RUNTIME_LIBRARY MultiThreaded$<$<CONFIG:Debug>:Debug>)
2024-03-13 18:11:02 +08:00
else()
2024-04-13 02:19:26 +08:00
set(CMAKE_MSVC_RUNTIME_LIBRARY MultiThreaded$<$<CONFIG:Debug>:Debug>DLL)
2024-03-13 18:11:02 +08:00
endif()
else()
2024-04-13 02:19:26 +08:00
# In case we are building static libraries, link also the runtime library
# statically so that MSVCR*.DLL is not required at runtime.
# https://msdn.microsoft.com/en-us/library/2kzt1wy3.aspx This is achieved by
# replacing msvc option /MD with /MT and /MDd with /MTd
2024-03-13 18:11:02 +08:00
# http://www.cmake.org/Wiki/CMake_FAQ#How_can_I_build_my_MSVC_application_with_a_static_runtime.3F
2024-04-13 02:19:26 +08:00
if(MSVC AND protobuf_MSVC_STATIC_RUNTIME)
2024-03-13 18:11:02 +08:00
foreach(flag_var
2024-04-13 02:19:26 +08:00
CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO)
2024-03-13 18:11:02 +08:00
if(${flag_var} MATCHES "/MD")
string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
endif(${flag_var} MATCHES "/MD")
endforeach(flag_var)
2024-04-13 02:19:26 +08:00
endif(MSVC AND protobuf_MSVC_STATIC_RUNTIME)
2024-03-13 18:11:02 +08:00
endif()
2024-04-13 02:19:26 +08:00
endif(protobuf_BUILD_SHARED_LIBS)
2024-03-13 18:11:02 +08:00
2024-04-13 02:19:26 +08:00
if(MSVC)
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
2024-03-13 18:11:02 +08:00
# Build with multiple processes
add_definitions(/MP)
endif()
# Set source file and execution character sets to UTF-8
add_definitions(/utf-8)
# MSVC warning suppressions
add_definitions(
/wd4065 # switch statement contains 'default' but no 'case' labels
2024-04-13 02:19:26 +08:00
/wd4244 # 'conversion' conversion from 'type1' to 'type2', possible loss of
# data
/wd4251 # 'identifier' : class 'type' needs to have dll-interface to be used
# by clients of class 'type2'
2024-03-13 18:11:02 +08:00
/wd4267 # 'var' : conversion from 'size_t' to 'type', possible loss of data
/wd4305 # 'identifier' : truncation from 'type1' to 'type2'
/wd4307 # 'operator' : integral constant overflow
/wd4309 # 'conversion' : truncation of constant value
2024-04-13 02:19:26 +08:00
/wd4334 # 'operator' : result of 32-bit shift implicitly converted to 64
# bits (was 64-bit shift intended?)
2024-03-13 18:11:02 +08:00
/wd4355 # 'this' : used in base member initializer list
/wd4506 # no definition for inline function 'function'
2024-04-13 02:19:26 +08:00
/wd4800 # 'type' : forcing value to bool 'true' or 'false' (performance
# warning)
2024-03-13 18:11:02 +08:00
/wd4996 # The compiler encountered a deprecated declaration.
)
# Allow big object
add_definitions(/bigobj)
string(REPLACE "/" "\\" PROTOBUF_SOURCE_WIN32_PATH ${protobuf_SOURCE_DIR})
string(REPLACE "/" "\\" PROTOBUF_BINARY_WIN32_PATH ${protobuf_BINARY_DIR})
2024-04-13 02:19:26 +08:00
string(REPLACE "." "," protobuf_RC_FILEVERSION "${protobuf_VERSION}")
configure_file(${protobuf_SOURCE_DIR}/cmake/extract_includes.bat.in
extract_includes.bat)
2024-03-13 18:11:02 +08:00
# Suppress linker warnings about files with no symbols defined.
set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} /ignore:4221")
2024-04-13 02:19:26 +08:00
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
2024-03-13 18:11:02 +08:00
# Configure Resource Compiler
enable_language(RC)
# use English language (0x409) in resource compiler
set(rc_flags "/l0x409")
# fix rc.exe invocations because of usage of add_definitions()
2024-04-13 02:19:26 +08:00
set(CMAKE_RC_COMPILE_OBJECT
"<CMAKE_RC_COMPILER> ${rc_flags} <DEFINES> /fo<OBJECT> <SOURCE>")
2024-03-13 18:11:02 +08:00
endif()
# Generate the version.rc file used elsewhere.
2024-04-13 02:19:26 +08:00
configure_file(${protobuf_SOURCE_DIR}/cmake/version.rc.in
${CMAKE_CURRENT_BINARY_DIR}/version.rc @ONLY)
2024-03-13 18:11:02 +08:00
set(protobuf_version_rc_file ${CMAKE_CURRENT_BINARY_DIR}/version.rc)
# Add the "lib" prefix for generated .lib outputs.
set(LIB_PREFIX lib)
2024-04-13 02:19:26 +08:00
else(MSVC)
2024-03-13 18:11:02 +08:00
# No version.rc file.
set(protobuf_version_rc_file)
2024-04-13 02:19:26 +08:00
# When building with "make", "lib" prefix will be added automatically by the
# build tool.
2024-03-13 18:11:02 +08:00
set(LIB_PREFIX)
2024-04-13 02:19:26 +08:00
endif(MSVC)
2024-03-13 18:11:02 +08:00
2024-04-13 02:19:26 +08:00
include_directories(${ZLIB_INCLUDE_DIRECTORIES} ${protobuf_BINARY_DIR}
${protobuf_SOURCE_DIR}/src)
2024-03-13 18:11:02 +08:00
2024-04-13 02:19:26 +08:00
if(protobuf_UNICODE)
2024-03-13 18:11:02 +08:00
add_definitions(-DUNICODE -D_UNICODE)
2024-04-13 02:19:26 +08:00
endif(protobuf_UNICODE)
2024-03-13 18:11:02 +08:00
include(${protobuf_SOURCE_DIR}/cmake/libprotobuf-lite.cmake)
include(${protobuf_SOURCE_DIR}/cmake/libprotobuf.cmake)
2024-04-13 02:19:26 +08:00
if(protobuf_BUILD_LIBPROTOC)
2024-03-13 18:11:02 +08:00
include(${protobuf_SOURCE_DIR}/cmake/libprotoc.cmake)
2024-04-13 02:19:26 +08:00
endif(protobuf_BUILD_LIBPROTOC)
if(protobuf_BUILD_PROTOC_BINARIES)
2024-03-13 18:11:02 +08:00
include(${protobuf_SOURCE_DIR}/cmake/protoc.cmake)
2024-04-13 02:19:26 +08:00
if(NOT DEFINED protobuf_PROTOC_EXE)
2024-03-13 18:11:02 +08:00
set(protobuf_PROTOC_EXE protoc)
2024-04-13 02:19:26 +08:00
endif(NOT DEFINED protobuf_PROTOC_EXE)
endif(protobuf_BUILD_PROTOC_BINARIES)
2024-03-13 18:11:02 +08:00
# Ensure we have a protoc executable if we need one
2024-04-13 02:19:26 +08:00
if(protobuf_BUILD_TESTS
OR protobuf_BUILD_CONFORMANCE
OR protobuf_BUILD_EXAMPLES)
if(NOT DEFINED protobuf_PROTOC_EXE)
2024-03-13 18:11:02 +08:00
find_program(protobuf_PROTOC_EXE protoc)
2024-04-13 02:19:26 +08:00
if(NOT protobuf_PROTOC_EXE)
message(
FATAL
"Build requires 'protoc' but binary not found and not building protoc.")
endif()
endif()
2024-03-13 18:11:02 +08:00
if(protobuf_VERBOSE)
message(STATUS "Using protoc : ${protobuf_PROTOC_EXE}")
endif(protobuf_VERBOSE)
2024-04-13 02:19:26 +08:00
endif()
2024-03-13 18:11:02 +08:00
2024-04-13 02:19:26 +08:00
if(protobuf_BUILD_TESTS)
2024-03-13 18:11:02 +08:00
enable_testing()
include(${protobuf_SOURCE_DIR}/cmake/tests.cmake)
2024-04-13 02:19:26 +08:00
endif(protobuf_BUILD_TESTS)
2024-03-13 18:11:02 +08:00
2024-04-13 02:19:26 +08:00
if(protobuf_BUILD_CONFORMANCE)
2024-03-13 18:11:02 +08:00
include(${protobuf_SOURCE_DIR}/cmake/conformance.cmake)
2024-04-13 02:19:26 +08:00
endif(protobuf_BUILD_CONFORMANCE)
2024-03-13 18:11:02 +08:00
2024-04-13 02:19:26 +08:00
if(protobuf_INSTALL)
2024-03-13 18:11:02 +08:00
include(${protobuf_SOURCE_DIR}/cmake/install.cmake)
2024-04-13 02:19:26 +08:00
endif(protobuf_INSTALL)
2024-03-13 18:11:02 +08:00
2024-04-13 02:19:26 +08:00
if(protobuf_BUILD_EXAMPLES)
2024-03-13 18:11:02 +08:00
include(${protobuf_SOURCE_DIR}/cmake/examples.cmake)
2024-04-13 02:19:26 +08:00
endif(protobuf_BUILD_EXAMPLES)
2024-03-13 18:11:02 +08:00
if(protobuf_VERBOSE)
message(STATUS "Protocol Buffers Configuring done")
endif(protobuf_VERBOSE)