2015-05-31 09:28:34 +00:00
|
|
|
set(libprotoc_files
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/code_generator.cc
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/command_line_interface.cc
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_enum.cc
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_enum_field.cc
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_extension.cc
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_field.cc
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_file.cc
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_generator.cc
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_helpers.cc
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_map_field.cc
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_message.cc
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_message_field.cc
|
2017-09-12 17:32:01 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_padding_optimizer.cc
|
2021-04-15 22:53:17 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_parse_function_generator.cc
|
2015-05-31 09:28:34 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_primitive_field.cc
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_service.cc
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_string_field.cc
|
2015-10-01 09:36:58 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_doc_comment.cc
|
2015-05-31 09:28:34 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_enum.cc
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_enum_field.cc
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_field_base.cc
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_generator.cc
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_helpers.cc
|
2015-06-24 16:21:55 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_map_field.cc
|
2015-05-31 09:28:34 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_message.cc
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_message_field.cc
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_primitive_field.cc
|
2015-11-19 13:05:17 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_reflection_class.cc
|
2015-05-31 09:28:34 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_repeated_enum_field.cc
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_repeated_message_field.cc
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_repeated_primitive_field.cc
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_source_generator_base.cc
|
2015-07-15 12:17:42 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_wrapper_field.cc
|
2015-05-31 09:28:34 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/java/java_context.cc
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/java/java_doc_comment.cc
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/java/java_enum.cc
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/java/java_enum_field.cc
|
2021-09-09 15:21:42 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/java/java_enum_field.h
|
2015-05-31 09:28:34 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/java/java_enum_field_lite.cc
|
2015-08-21 18:18:45 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/java/java_enum_lite.cc
|
2015-05-31 09:28:34 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/java/java_extension.cc
|
2016-01-29 21:51:05 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/java/java_extension_lite.cc
|
2015-05-31 09:28:34 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/java/java_field.cc
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/java/java_file.cc
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/java/java_generator.cc
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/java/java_generator_factory.cc
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/java/java_helpers.cc
|
2021-03-24 20:00:57 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/java/java_kotlin_generator.cc
|
2015-05-31 09:28:34 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/java/java_map_field.cc
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/java/java_map_field_lite.cc
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/java/java_message.cc
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/java/java_message_builder.cc
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/java/java_message_builder_lite.cc
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/java/java_message_field.cc
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/java/java_message_field_lite.cc
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/java/java_message_lite.cc
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/java/java_name_resolver.cc
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/java/java_primitive_field.cc
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/java/java_primitive_field_lite.cc
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/java/java_service.cc
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/java/java_shared_code_generator.cc
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/java/java_string_field.cc
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/java/java_string_field_lite.cc
|
2015-12-12 01:09:20 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/js/js_generator.cc
|
2016-11-18 01:05:38 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/js/well_known_types_embed.cc
|
2015-05-31 09:28:34 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_enum.cc
|
2021-09-09 15:21:42 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_enum.h
|
2015-05-31 09:28:34 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_enum_field.cc
|
2021-09-09 15:21:42 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_enum_field.h
|
2015-05-31 09:28:34 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_extension.cc
|
2021-09-09 15:21:42 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_extension.h
|
2015-05-31 09:28:34 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_field.cc
|
2021-09-09 15:21:42 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_field.h
|
2015-05-31 09:28:34 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_file.cc
|
2021-09-09 15:21:42 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_file.h
|
2015-05-31 09:28:34 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_generator.cc
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_map_field.cc
|
2021-09-09 15:21:42 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_map_field.h
|
2015-05-31 09:28:34 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_message.cc
|
2021-09-09 15:21:42 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_message.h
|
2015-05-31 09:28:34 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_message_field.cc
|
2021-09-09 15:21:42 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_message_field.h
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_nsobject_methods.h
|
2015-05-31 09:28:34 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_oneof.cc
|
2021-09-09 15:21:42 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_oneof.h
|
2015-05-31 09:28:34 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_primitive_field.cc
|
2021-09-09 15:21:42 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_primitive_field.h
|
2016-09-15 18:09:01 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/php/php_generator.cc
|
2015-05-31 09:28:34 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/plugin.cc
|
2018-03-02 00:36:05 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/plugin.pb.cc
|
2015-05-31 09:28:34 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/python/python_generator.cc
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/ruby/ruby_generator.cc
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/subprocess.cc
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/zip_writer.cc
|
2021-09-09 15:21:42 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/zip_writer.h
|
2015-05-31 09:28:34 +00:00
|
|
|
)
|
|
|
|
|
2017-05-29 15:34:08 +00:00
|
|
|
set(libprotoc_headers
|
2021-09-09 15:21:42 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/code_generator.h
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/command_line_interface.h
|
2017-05-29 15:34:08 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_file.h
|
2021-09-09 15:21:42 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_generator.h
|
2017-05-29 15:34:08 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_helpers.h
|
2021-01-26 00:21:42 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_names.h
|
2017-05-29 15:34:08 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_doc_comment.h
|
2021-09-09 15:21:42 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_generator.h
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_names.h
|
2017-05-29 15:34:08 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_options.h
|
2021-09-09 15:21:42 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/java/java_generator.h
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/java/java_kotlin_generator.h
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/java/java_names.h
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/js/js_generator.h
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_generator.h
|
2017-05-29 15:34:08 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_helpers.h
|
2021-09-09 15:21:42 +00:00
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/php/php_generator.h
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/plugin.h
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/python/python_generator.h
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/ruby/ruby_generator.h
|
2017-05-29 15:34:08 +00:00
|
|
|
)
|
|
|
|
|
2021-06-04 18:13:56 +00:00
|
|
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
2018-04-27 22:12:38 +00:00
|
|
|
set(libprotoc_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(libprotoc ${protobuf_SHARED_OR_STATIC}
|
2018-04-27 22:12:38 +00:00
|
|
|
${libprotoc_files} ${libprotoc_headers} ${libprotoc_rc_files})
|
2015-05-31 09:28:34 +00:00
|
|
|
target_link_libraries(libprotoc libprotobuf)
|
2015-10-14 23:56:48 +00:00
|
|
|
if(MSVC AND protobuf_BUILD_SHARED_LIBS)
|
|
|
|
target_compile_definitions(libprotoc
|
|
|
|
PUBLIC PROTOBUF_USE_DLLS
|
|
|
|
PRIVATE LIBPROTOC_EXPORTS)
|
|
|
|
endif()
|
2015-05-31 09:28:34 +00:00
|
|
|
set_target_properties(libprotoc PROPERTIES
|
|
|
|
COMPILE_DEFINITIONS LIBPROTOC_EXPORTS
|
2018-01-29 14:11:59 +00:00
|
|
|
VERSION ${protobuf_VERSION}
|
2015-09-17 10:00:12 +00:00
|
|
|
OUTPUT_NAME ${LIB_PREFIX}protoc
|
|
|
|
DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}")
|
2018-01-29 14:13:23 +00:00
|
|
|
add_library(protobuf::libprotoc ALIAS libprotoc)
|