• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_padding_optimizer.cc
15  ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_primitive_field.cc
16  ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_service.cc
17  ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_string_field.cc
18  ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_doc_comment.cc
19  ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_enum.cc
20  ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_enum_field.cc
21  ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_field_base.cc
22  ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_generator.cc
23  ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_helpers.cc
24  ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_map_field.cc
25  ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_message.cc
26  ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_message_field.cc
27  ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_primitive_field.cc
28  ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_reflection_class.cc
29  ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_repeated_enum_field.cc
30  ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_repeated_message_field.cc
31  ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_repeated_primitive_field.cc
32  ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_source_generator_base.cc
33  ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_wrapper_field.cc
34  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_context.cc
35  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_doc_comment.cc
36  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_enum.cc
37  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_enum_field.cc
38  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_enum_field_lite.cc
39  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_enum_lite.cc
40  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_extension.cc
41  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_extension_lite.cc
42  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_field.cc
43  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_file.cc
44  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_generator.cc
45  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_generator_factory.cc
46  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_helpers.cc
47  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_map_field.cc
48  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_map_field_lite.cc
49  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_message.cc
50  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_message_builder.cc
51  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_message_builder_lite.cc
52  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_message_field.cc
53  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_message_field_lite.cc
54  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_message_lite.cc
55  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_name_resolver.cc
56  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_primitive_field.cc
57  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_primitive_field_lite.cc
58  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_service.cc
59  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_shared_code_generator.cc
60  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_string_field.cc
61  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_string_field_lite.cc
62  ${protobuf_source_dir}/src/google/protobuf/compiler/js/js_generator.cc
63  ${protobuf_source_dir}/src/google/protobuf/compiler/js/well_known_types_embed.cc
64  ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_enum.cc
65  ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_enum_field.cc
66  ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_extension.cc
67  ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_field.cc
68  ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_file.cc
69  ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_generator.cc
70  ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc
71  ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_map_field.cc
72  ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_message.cc
73  ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_message_field.cc
74  ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_oneof.cc
75  ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_primitive_field.cc
76  ${protobuf_source_dir}/src/google/protobuf/compiler/php/php_generator.cc
77  ${protobuf_source_dir}/src/google/protobuf/compiler/plugin.cc
78  ${protobuf_source_dir}/src/google/protobuf/compiler/plugin.pb.cc
79  ${protobuf_source_dir}/src/google/protobuf/compiler/python/python_generator.cc
80  ${protobuf_source_dir}/src/google/protobuf/compiler/ruby/ruby_generator.cc
81  ${protobuf_source_dir}/src/google/protobuf/compiler/subprocess.cc
82  ${protobuf_source_dir}/src/google/protobuf/compiler/zip_writer.cc
83)
84
85set(libprotoc_headers
86  ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_enum.h
87  ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_enum_field.h
88  ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_extension.h
89  ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_field.h
90  ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_file.h
91  ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_helpers.h
92  ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_map_field.h
93  ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_message.h
94  ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_message_field.h
95  ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_message_layout_helper.h
96  ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_options.h
97  ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_padding_optimizer.h
98  ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_primitive_field.h
99  ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_service.h
100  ${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_string_field.h
101  ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_doc_comment.h
102  ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_enum.h
103  ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_enum_field.h
104  ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_field_base.h
105  ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_helpers.h
106  ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_map_field.h
107  ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_message.h
108  ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_message_field.h
109  ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_options.h
110  ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_primitive_field.h
111  ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_reflection_class.h
112  ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_repeated_enum_field.h
113  ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_repeated_message_field.h
114  ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_repeated_primitive_field.h
115  ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_source_generator_base.h
116  ${protobuf_source_dir}/src/google/protobuf/compiler/csharp/csharp_wrapper_field.h
117  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_context.h
118  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_doc_comment.h
119  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_enum.h
120  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_enum_field.h
121  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_enum_field_lite.h
122  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_enum_lite.h
123  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_extension.h
124  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_extension_lite.h
125  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_field.h
126  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_file.h
127  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_generator_factory.h
128  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_helpers.h
129  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_map_field.h
130  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_map_field_lite.h
131  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_message.h
132  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_message_builder.h
133  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_message_builder_lite.h
134  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_message_field.h
135  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_message_field_lite.h
136  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_message_lite.h
137  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_name_resolver.h
138  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_options.h
139  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_primitive_field.h
140  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_primitive_field_lite.h
141  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_service.h
142  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_shared_code_generator.h
143  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_string_field.h
144  ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_string_field_lite.h
145  ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_enum.h
146  ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_enum_field.h
147  ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_extension.h
148  ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_field.h
149  ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_file.h
150  ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_helpers.h
151  ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_map_field.h
152  ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_message.h
153  ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_message_field.h
154  ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_nsobject_methods.h
155  ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_oneof.h
156  ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_primitive_field.h
157  ${protobuf_source_dir}/src/google/protobuf/compiler/scc.h
158  ${protobuf_source_dir}/src/google/protobuf/compiler/subprocess.h
159  ${protobuf_source_dir}/src/google/protobuf/compiler/zip_writer.h
160)
161
162if (MSVC)
163set(libprotoc_rc_files
164  ${CMAKE_CURRENT_BINARY_DIR}/version.rc
165)
166endif()
167
168add_library(libprotoc ${protobuf_SHARED_OR_STATIC}
169  ${libprotoc_files} ${libprotoc_headers} ${libprotoc_rc_files})
170target_link_libraries(libprotoc libprotobuf)
171if(MSVC AND protobuf_BUILD_SHARED_LIBS)
172  target_compile_definitions(libprotoc
173    PUBLIC  PROTOBUF_USE_DLLS
174    PRIVATE LIBPROTOC_EXPORTS)
175endif()
176set_target_properties(libprotoc PROPERTIES
177    COMPILE_DEFINITIONS LIBPROTOC_EXPORTS
178    VERSION ${protobuf_VERSION}
179    OUTPUT_NAME ${LIB_PREFIX}protoc
180    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}")
181add_library(protobuf::libprotoc ALIAS libprotoc)
182
183