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