aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmake/libprotobuf-lite.cmake
diff options
context:
space:
mode:
authorGravatar Feng Xiao <xfxyjwf@gmail.com>2015-06-04 13:35:45 -0700
committerGravatar Feng Xiao <xfxyjwf@gmail.com>2015-06-04 13:35:45 -0700
commit42f109d7bcc98e1288b4881fd37734782f7cbab5 (patch)
tree7fcbfc483829208a808769f123cedf5a6c83fd4b /cmake/libprotobuf-lite.cmake
parent60c510a381255aa75af7eea1204eafdf22df09f2 (diff)
parent2286ab328c0ca04630193b1d3c1aa8eb5fb7aea3 (diff)
Merge pull request #457 from xfxyjwf/cmake
Add cmake support.
Diffstat (limited to 'cmake/libprotobuf-lite.cmake')
-rw-r--r--cmake/libprotobuf-lite.cmake23
1 files changed, 23 insertions, 0 deletions
diff --git a/cmake/libprotobuf-lite.cmake b/cmake/libprotobuf-lite.cmake
new file mode 100644
index 00000000..32c2d026
--- /dev/null
+++ b/cmake/libprotobuf-lite.cmake
@@ -0,0 +1,23 @@
+set(libprotobuf_lite_files
+ ${protobuf_source_dir}/src/google/protobuf/arena.cc
+ ${protobuf_source_dir}/src/google/protobuf/arenastring.cc
+ ${protobuf_source_dir}/src/google/protobuf/extension_set.cc
+ ${protobuf_source_dir}/src/google/protobuf/generated_message_util.cc
+ ${protobuf_source_dir}/src/google/protobuf/io/coded_stream.cc
+ ${protobuf_source_dir}/src/google/protobuf/io/zero_copy_stream.cc
+ ${protobuf_source_dir}/src/google/protobuf/io/zero_copy_stream_impl_lite.cc
+ ${protobuf_source_dir}/src/google/protobuf/message_lite.cc
+ ${protobuf_source_dir}/src/google/protobuf/repeated_field.cc
+ ${protobuf_source_dir}/src/google/protobuf/stubs/atomicops_internals_x86_gcc.cc
+ ${protobuf_source_dir}/src/google/protobuf/stubs/atomicops_internals_x86_msvc.cc
+ ${protobuf_source_dir}/src/google/protobuf/stubs/common.cc
+ ${protobuf_source_dir}/src/google/protobuf/stubs/once.cc
+ ${protobuf_source_dir}/src/google/protobuf/stubs/stringprintf.cc
+ ${protobuf_source_dir}/src/google/protobuf/wire_format_lite.cc
+)
+
+add_library(libprotobuf-lite ${libprotobuf_lite_files})
+target_link_libraries(libprotobuf-lite ${CMAKE_THREAD_LIBS_INIT})
+set_target_properties(libprotobuf-lite PROPERTIES
+ COMPILE_DEFINITIONS LIBPROTOBUF_EXPORTS
+ OUTPUT_NAME ${LIB_PREFIX}protobuf-lite)