1set(libprotoc_files
2  ${protobuf_source_dir}/src/google/protobuf/compiler/code_generator.cc
3  ${protobuf_source_dir}/src/google/protobuf/compiler/command_line_interface.cc
4  ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_enum.cc
5  ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_enum_field.cc
6  ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_extension.cc
7  ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_field.cc
8  ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_file.cc
9  ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_generator.cc
10  ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_helpers.cc
11  ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_map_field.cc
12  ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_message.cc
13  ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_message_field.cc
14  ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_primitive_field.cc
15  ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_service.cc
16  ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_string_field.cc
17  ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_doc_comment.cc
18  ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_enum.cc
19  ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_enum_field.cc
20  ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_field_base.cc
21  ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_generator.cc
22  ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_helpers.cc
23  ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_map_field.cc
24  ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_message.cc
25  ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_message_field.cc
26  ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_primitive_field.cc
27  ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_reflection_class.cc
28  ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_repeated_enum_field.cc
29  ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_repeated_message_field.cc
30  ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_repeated_primitive_field.cc
31  ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_source_generator_base.cc
32  ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_wrapper_field.cc
33  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_context.cc
34  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_doc_comment.cc
35  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_enum.cc
36  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_enum_field.cc
37  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_enum_field_lite.cc
38  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_enum_lite.cc
39  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_extension.cc
40  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_extension_lite.cc
41  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_field.cc
42  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_file.cc
43  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_generator.cc
44  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_generator_factory.cc
45  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_helpers.cc
46  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_lazy_message_field.cc
47  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_lazy_message_field_lite.cc
48  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_map_field.cc
49  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_map_field_lite.cc
50  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_message.cc
51  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_message_builder.cc
52  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_message_builder_lite.cc
53  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_message_field.cc
54  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_message_field_lite.cc
55  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_message_lite.cc
56  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_name_resolver.cc
57  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_primitive_field.cc
58  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_primitive_field_lite.cc
59  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_service.cc
60  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_shared_code_generator.cc
61  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_string_field.cc
62  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_string_field_lite.cc
63  ${protobuf_source_dir}/src/google/protobuf/compiler/javanano/javanano_enum.cc
64  ${protobuf_source_dir}/src/google/protobuf/compiler/javanano/javanano_enum_field.cc
65  ${protobuf_source_dir}/src/google/protobuf/compiler/javanano/javanano_extension.cc
66  ${protobuf_source_dir}/src/google/protobuf/compiler/javanano/javanano_field.cc
67  ${protobuf_source_dir}/src/google/protobuf/compiler/javanano/javanano_file.cc
68  ${protobuf_source_dir}/src/google/protobuf/compiler/javanano/javanano_generator.cc
69  ${protobuf_source_dir}/src/google/protobuf/compiler/javanano/javanano_helpers.cc
70  ${protobuf_source_dir}/src/google/protobuf/compiler/javanano/javanano_map_field.cc
71  ${protobuf_source_dir}/src/google/protobuf/compiler/javanano/javanano_message.cc
72  ${protobuf_source_dir}/src/google/protobuf/compiler/javanano/javanano_message_field.cc
73  ${protobuf_source_dir}/src/google/protobuf/compiler/javanano/javanano_primitive_field.cc
74  ${protobuf_source_dir}/src/google/protobuf/compiler/js/js_generator.cc
75  ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_enum.cc
76  ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_enum_field.cc
77  ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_extension.cc
78  ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_field.cc
79  ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_file.cc
80  ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_generator.cc
81  ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc
82  ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_map_field.cc
83  ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_message.cc
84  ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_message_field.cc
85  ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_oneof.cc
86  ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_primitive_field.cc
87  ${protobuf_source_dir}/src/google/protobuf/compiler/plugin.cc
88  ${protobuf_source_dir}/src/google/protobuf/compiler/plugin.pb.cc
89  ${protobuf_source_dir}/src/google/protobuf/compiler/python/python_generator.cc
90  ${protobuf_source_dir}/src/google/protobuf/compiler/ruby/ruby_generator.cc
91  ${protobuf_source_dir}/src/google/protobuf/compiler/subprocess.cc
92  ${protobuf_source_dir}/src/google/protobuf/compiler/zip_writer.cc
93)
94
95add_library(libprotoc ${protobuf_SHARED_OR_STATIC}
96  ${libprotoc_files})
97target_link_libraries(libprotoc libprotobuf)
98if(MSVC AND protobuf_BUILD_SHARED_LIBS)
99  target_compile_definitions(libprotoc
100    PUBLIC  PROTOBUF_USE_DLLS
101    PRIVATE LIBPROTOC_EXPORTS)
102endif()
103set_target_properties(libprotoc PROPERTIES
104    COMPILE_DEFINITIONS LIBPROTOC_EXPORTS
105    OUTPUT_NAME ${LIB_PREFIX}protoc
106    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}")
107