Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1 | set(libprotobuf_lite_files |
| 2 | ${protobuf_source_dir}/src/google/protobuf/arena.cc |
| 3 | ${protobuf_source_dir}/src/google/protobuf/arenastring.cc |
| 4 | ${protobuf_source_dir}/src/google/protobuf/extension_set.cc |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame] | 5 | ${protobuf_source_dir}/src/google/protobuf/generated_message_table_driven_lite.cc |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 6 | ${protobuf_source_dir}/src/google/protobuf/generated_message_util.cc |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame] | 7 | ${protobuf_source_dir}/src/google/protobuf/implicit_weak_message.cc |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 8 | ${protobuf_source_dir}/src/google/protobuf/io/coded_stream.cc |
| 9 | ${protobuf_source_dir}/src/google/protobuf/io/zero_copy_stream.cc |
| 10 | ${protobuf_source_dir}/src/google/protobuf/io/zero_copy_stream_impl_lite.cc |
| 11 | ${protobuf_source_dir}/src/google/protobuf/message_lite.cc |
| 12 | ${protobuf_source_dir}/src/google/protobuf/repeated_field.cc |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 13 | ${protobuf_source_dir}/src/google/protobuf/stubs/bytestream.cc |
| 14 | ${protobuf_source_dir}/src/google/protobuf/stubs/common.cc |
| 15 | ${protobuf_source_dir}/src/google/protobuf/stubs/int128.cc |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame] | 16 | ${protobuf_source_dir}/src/google/protobuf/stubs/io_win32.cc |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 17 | ${protobuf_source_dir}/src/google/protobuf/stubs/status.cc |
| 18 | ${protobuf_source_dir}/src/google/protobuf/stubs/statusor.cc |
| 19 | ${protobuf_source_dir}/src/google/protobuf/stubs/stringpiece.cc |
| 20 | ${protobuf_source_dir}/src/google/protobuf/stubs/stringprintf.cc |
| 21 | ${protobuf_source_dir}/src/google/protobuf/stubs/structurally_valid.cc |
| 22 | ${protobuf_source_dir}/src/google/protobuf/stubs/strutil.cc |
| 23 | ${protobuf_source_dir}/src/google/protobuf/stubs/time.cc |
| 24 | ${protobuf_source_dir}/src/google/protobuf/wire_format_lite.cc |
| 25 | ) |
| 26 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame] | 27 | set(libprotobuf_lite_includes |
| 28 | ${protobuf_source_dir}/src/google/protobuf/arena.h |
| 29 | ${protobuf_source_dir}/src/google/protobuf/arenastring.h |
| 30 | ${protobuf_source_dir}/src/google/protobuf/extension_set.h |
| 31 | ${protobuf_source_dir}/src/google/protobuf/generated_message_util.h |
| 32 | ${protobuf_source_dir}/src/google/protobuf/implicit_weak_message.h |
| 33 | ${protobuf_source_dir}/src/google/protobuf/io/coded_stream.h |
| 34 | ${protobuf_source_dir}/src/google/protobuf/io/zero_copy_stream.h |
| 35 | ${protobuf_source_dir}/src/google/protobuf/io/zero_copy_stream_impl_lite.h |
| 36 | ${protobuf_source_dir}/src/google/protobuf/message_lite.h |
| 37 | ${protobuf_source_dir}/src/google/protobuf/repeated_field.h |
| 38 | ${protobuf_source_dir}/src/google/protobuf/stubs/bytestream.h |
| 39 | ${protobuf_source_dir}/src/google/protobuf/stubs/common.h |
| 40 | ${protobuf_source_dir}/src/google/protobuf/stubs/int128.h |
| 41 | ${protobuf_source_dir}/src/google/protobuf/stubs/once.h |
| 42 | ${protobuf_source_dir}/src/google/protobuf/stubs/status.h |
| 43 | ${protobuf_source_dir}/src/google/protobuf/stubs/statusor.h |
| 44 | ${protobuf_source_dir}/src/google/protobuf/stubs/stringpiece.h |
| 45 | ${protobuf_source_dir}/src/google/protobuf/stubs/stringprintf.h |
| 46 | ${protobuf_source_dir}/src/google/protobuf/stubs/strutil.h |
| 47 | ${protobuf_source_dir}/src/google/protobuf/stubs/time.h |
| 48 | ${protobuf_source_dir}/src/google/protobuf/wire_format_lite.h |
| 49 | ) |
| 50 | |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 51 | add_library(libprotobuf-lite ${protobuf_SHARED_OR_STATIC} |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame] | 52 | ${libprotobuf_lite_files} ${libprotobuf_lite_includes}) |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 53 | target_link_libraries(libprotobuf-lite ${CMAKE_THREAD_LIBS_INIT}) |
| 54 | target_include_directories(libprotobuf-lite PUBLIC ${protobuf_source_dir}/src) |
| 55 | if(MSVC AND protobuf_BUILD_SHARED_LIBS) |
| 56 | target_compile_definitions(libprotobuf-lite |
| 57 | PUBLIC PROTOBUF_USE_DLLS |
| 58 | PRIVATE LIBPROTOBUF_EXPORTS) |
| 59 | endif() |
| 60 | set_target_properties(libprotobuf-lite PROPERTIES |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame] | 61 | VERSION ${protobuf_VERSION} |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 62 | OUTPUT_NAME ${LIB_PREFIX}protobuf-lite |
| 63 | DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}") |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame] | 64 | add_library(protobuf::libprotobuf-lite ALIAS libprotobuf-lite) |