Skip to content

Commit 2484b85

Browse files
author
minggo
committed
Merge pull request #43 from andyque/v3
add cmakelists.txt to protobuf-lite
2 parents 46b4353 + f2cb647 commit 2484b85

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

protobuf-lite/CMakeLists.txt

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
set(PROTOBUF_SRC
2+
./src/google/protobuf/stubs/once.cc
3+
./src/google/protobuf/stubs/common.cc
4+
./src/google/protobuf/stubs/stringprintf.cc
5+
./src/google/protobuf/generated_message_util.cc
6+
./src/google/protobuf/message_lite.cc
7+
./src/google/protobuf/extension_set.cc
8+
./src/google/protobuf/wire_format_lite.cc
9+
./src/google/protobuf/repeated_field.cc
10+
./src/google/protobuf/io/zero_copy_stream_impl.cc
11+
./src/google/protobuf/io/zero_copy_stream_impl_lite.cc
12+
./src/google/protobuf/io/zero_copy_stream.cc
13+
./src/google/protobuf/io/coded_stream.cc
14+
./src/google/protobuf/stubs/atomicops_internals_x86_gcc.cc
15+
)
16+
17+
include_directories(
18+
${CMAKE_CURRENT_SOURCE_DIR}/src
19+
${CMAKE_CURRENT_SOURCE_DIR}/src/google/protobuf
20+
)
21+
22+
add_library(protobuf STATIC
23+
${PROTOBUF_SRC}
24+
)
25+
26+
set_target_properties(protobuf
27+
PROPERTIES
28+
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
29+
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
30+
)

0 commit comments

Comments
 (0)