2015-05-31 09:28:34 +00:00
|
|
|
set(protoc_files
|
|
|
|
${protobuf_source_dir}/src/google/protobuf/compiler/main.cc
|
|
|
|
)
|
|
|
|
|
2018-05-15 20:19:58 +00:00
|
|
|
if (MSVC)
|
2018-04-27 22:12:38 +00:00
|
|
|
set(protoc_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
|
|
|
|
|
|
|
add_executable(protoc ${protoc_files} ${protoc_rc_files})
|
2015-05-31 09:28:34 +00:00
|
|
|
target_link_libraries(protoc libprotobuf libprotoc)
|
2018-01-29 14:13:23 +00:00
|
|
|
add_executable(protobuf::protoc ALIAS protoc)
|
2018-04-27 21:44:38 +00:00
|
|
|
|
|
|
|
set_target_properties(protoc PROPERTIES
|
|
|
|
VERSION ${protobuf_VERSION})
|