protobuf/cmake/protoc.cmake

17 lines
394 B
CMake
Raw Normal View History

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)
set(protoc_rc_files
${CMAKE_CURRENT_BINARY_DIR}/version.rc
)
2018-05-15 20:19:58 +00:00
endif()
add_executable(protoc ${protoc_files} ${protoc_rc_files})
2015-05-31 09:28:34 +00:00
target_link_libraries(protoc libprotobuf libprotoc)
add_executable(protobuf::protoc ALIAS protoc)
set_target_properties(protoc PROPERTIES
VERSION ${protobuf_VERSION})