|
@@ -40,6 +40,7 @@ endif()
|
|
if(WITH_PROTOC)
|
|
if(WITH_PROTOC)
|
|
set(protobuf_PROTOC_EXE ${WITH_PROTOC} CACHE FILEPATH "Protocol Buffer Compiler executable" FORCE)
|
|
set(protobuf_PROTOC_EXE ${WITH_PROTOC} CACHE FILEPATH "Protocol Buffer Compiler executable" FORCE)
|
|
endif()
|
|
endif()
|
|
|
|
+option(protobuf_DISABLE_RTTI "Remove runtime type information in the binaries" ON)
|
|
option(protobuf_BUILD_TESTS "Build tests" ON)
|
|
option(protobuf_BUILD_TESTS "Build tests" ON)
|
|
option(protobuf_BUILD_CONFORMANCE "Build conformance tests" OFF)
|
|
option(protobuf_BUILD_CONFORMANCE "Build conformance tests" OFF)
|
|
option(protobuf_BUILD_EXAMPLES "Build examples" OFF)
|
|
option(protobuf_BUILD_EXAMPLES "Build examples" OFF)
|
|
@@ -117,6 +118,10 @@ endif()
|
|
|
|
|
|
add_definitions(-DGOOGLE_PROTOBUF_CMAKE_BUILD)
|
|
add_definitions(-DGOOGLE_PROTOBUF_CMAKE_BUILD)
|
|
|
|
|
|
|
|
+if (protobuf_DISABLE_RTTI)
|
|
|
|
+ add_definitions(-DGOOGLE_PROTOBUF_NO_RTTI=1)
|
|
|
|
+endif()
|
|
|
|
+
|
|
find_package(Threads REQUIRED)
|
|
find_package(Threads REQUIRED)
|
|
if (CMAKE_USE_PTHREADS_INIT)
|
|
if (CMAKE_USE_PTHREADS_INIT)
|
|
add_definitions(-DHAVE_PTHREAD)
|
|
add_definitions(-DHAVE_PTHREAD)
|