From f2cb64719e28448dc5122578c8b6d7d7fb820bcc Mon Sep 17 00:00:00 2001 From: andyque Date: Mon, 13 Oct 2014 18:33:50 +0800 Subject: [PATCH] add protobuf cmakelist --- protobuf-lite/CMakeLists.txt | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 protobuf-lite/CMakeLists.txt diff --git a/protobuf-lite/CMakeLists.txt b/protobuf-lite/CMakeLists.txt new file mode 100644 index 0000000000..aafdbc6bca --- /dev/null +++ b/protobuf-lite/CMakeLists.txt @@ -0,0 +1,30 @@ +set(PROTOBUF_SRC +./src/google/protobuf/stubs/once.cc +./src/google/protobuf/stubs/common.cc +./src/google/protobuf/stubs/stringprintf.cc +./src/google/protobuf/generated_message_util.cc +./src/google/protobuf/message_lite.cc +./src/google/protobuf/extension_set.cc +./src/google/protobuf/wire_format_lite.cc +./src/google/protobuf/repeated_field.cc +./src/google/protobuf/io/zero_copy_stream_impl.cc +./src/google/protobuf/io/zero_copy_stream_impl_lite.cc +./src/google/protobuf/io/zero_copy_stream.cc +./src/google/protobuf/io/coded_stream.cc +./src/google/protobuf/stubs/atomicops_internals_x86_gcc.cc +) + +include_directories( + ${CMAKE_CURRENT_SOURCE_DIR}/src + ${CMAKE_CURRENT_SOURCE_DIR}/src/google/protobuf +) + +add_library(protobuf STATIC + ${PROTOBUF_SRC} +) + +set_target_properties(protobuf + PROPERTIES + ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" + LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" +)