2015-05-31 09:28:34 +00:00
|
|
|
set(libprotobuf_lite_files
|
2019-02-22 10:13:33 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/any_lite.cc
|
2015-05-31 09:28:34 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/arena.cc
|
2020-09-28 18:54:54 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/arenastring.cc
|
2015-05-31 09:28:34 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/extension_set.cc
|
2019-05-03 21:33:43 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/generated_enum_util.cc
|
2017-07-25 21:38:00 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/generated_message_table_driven_lite.cc
|
2015-05-31 09:28:34 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/generated_message_util.cc
|
2017-12-01 18:05:10 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/implicit_weak_message.cc
|
2015-05-31 09:28:34 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/io/coded_stream.cc
|
2019-04-09 13:23:32 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/io/io_win32.cc
|
2018-12-20 19:13:57 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/io/strtod.cc
|
2015-05-31 09:28:34 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/io/zero_copy_stream.cc
|
2019-07-20 10:49:03 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/io/zero_copy_stream_impl.cc
|
2015-05-31 09:28:34 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/io/zero_copy_stream_impl_lite.cc
|
2020-08-17 22:26:13 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/map.cc
|
2015-05-31 09:28:34 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/message_lite.cc
|
2019-03-14 10:35:05 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/parse_context.cc
|
2015-05-31 09:28:34 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/repeated_field.cc
|
2015-06-16 01:21:48 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/stubs/bytestream.cc
|
2015-05-31 09:28:34 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/stubs/common.cc
|
2015-08-21 18:18:45 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/stubs/int128.cc
|
2015-06-16 01:21:48 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/stubs/status.cc
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/stubs/statusor.cc
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/stubs/stringpiece.cc
|
2015-05-31 09:28:34 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/stubs/stringprintf.cc
|
2015-08-26 00:06:33 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/stubs/structurally_valid.cc
|
2015-06-16 04:42:57 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/stubs/strutil.cc
|
2015-06-16 01:21:48 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/stubs/time.cc
|
2015-05-31 09:28:34 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/wire_format_lite.cc
|
|
|
|
)
|
|
|
|
|
2017-05-29 15:34:08 +00:00
|
|
|
set(libprotobuf_lite_includes
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/arena.h
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/arenastring.h
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/extension_set.h
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/generated_message_util.h
|
2017-12-01 18:05:10 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/implicit_weak_message.h
|
2018-12-15 00:05:03 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/parse_context.h
|
2017-05-29 15:34:08 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/io/coded_stream.h
|
2018-12-20 19:13:57 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/io/strtod.h
|
2017-05-29 15:34:08 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/io/zero_copy_stream.h
|
2019-05-03 21:33:43 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/io/zero_copy_stream_impl.h
|
2017-05-29 15:34:08 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/io/zero_copy_stream_impl_lite.h
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/message_lite.h
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/repeated_field.h
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/stubs/bytestream.h
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/stubs/common.h
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/stubs/int128.h
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/stubs/once.h
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/stubs/status.h
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/stubs/statusor.h
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/stubs/stringpiece.h
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/stubs/stringprintf.h
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/stubs/strutil.h
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/stubs/time.h
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/wire_format_lite.h
|
|
|
|
)
|
|
|
|
|
2018-05-15 20:19:58 +00:00
|
|
|
if (MSVC)
|
2018-04-27 22:12:38 +00:00
|
|
|
set(libprotobuf_lite_rc_files
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/version.rc
|
|
|
|
)
|
2018-05-15 20:19:58 +00:00
|
|
|
endif()
|
2018-04-27 22:12:38 +00:00
|
|
|
|
2015-10-14 23:56:48 +00:00
|
|
|
add_library(libprotobuf-lite ${protobuf_SHARED_OR_STATIC}
|
2018-04-27 22:12:38 +00:00
|
|
|
${libprotobuf_lite_files} ${libprotobuf_lite_includes} ${libprotobuf_lite_rc_files})
|
2015-05-31 09:28:34 +00:00
|
|
|
target_link_libraries(libprotobuf-lite ${CMAKE_THREAD_LIBS_INIT})
|
2019-07-03 13:34:09 +00:00
|
|
|
if(protobuf_LINK_LIBATOMIC)
|
|
|
|
target_link_libraries(libprotobuf-lite atomic)
|
|
|
|
endif()
|
2020-03-08 11:33:02 +00:00
|
|
|
if(${CMAKE_SYSTEM_NAME} STREQUAL "Android")
|
|
|
|
target_link_libraries(libprotobuf-lite log)
|
|
|
|
endif()
|
2015-07-28 23:18:35 +00:00
|
|
|
target_include_directories(libprotobuf-lite PUBLIC ${protobuf_source_dir}/src)
|
2015-10-14 23:56:48 +00:00
|
|
|
if(MSVC AND protobuf_BUILD_SHARED_LIBS)
|
|
|
|
target_compile_definitions(libprotobuf-lite
|
|
|
|
PUBLIC PROTOBUF_USE_DLLS
|
|
|
|
PRIVATE LIBPROTOBUF_EXPORTS)
|
|
|
|
endif()
|
2015-05-31 09:28:34 +00:00
|
|
|
set_target_properties(libprotobuf-lite PROPERTIES
|
2018-01-29 14:11:59 +00:00
|
|
|
VERSION ${protobuf_VERSION}
|
2015-09-17 10:00:12 +00:00
|
|
|
OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
|
|
|
|
DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}")
|
2018-01-29 14:13:23 +00:00
|
|
|
add_library(protobuf::libprotobuf-lite ALIAS libprotobuf-lite)
|