Unverified Commit 6ab3196d authored by Feng Xiao's avatar Feng Xiao Committed by GitHub

Merge pull request #4632 from chronoxor/master

Fix issue with version.rc
parents 5932547a 291d9a0a
...@@ -48,9 +48,11 @@ set(libprotobuf_lite_includes ...@@ -48,9 +48,11 @@ set(libprotobuf_lite_includes
${protobuf_source_dir}/src/google/protobuf/wire_format_lite.h ${protobuf_source_dir}/src/google/protobuf/wire_format_lite.h
) )
if (MSVC)
set(libprotobuf_lite_rc_files set(libprotobuf_lite_rc_files
${CMAKE_CURRENT_BINARY_DIR}/version.rc ${CMAKE_CURRENT_BINARY_DIR}/version.rc
) )
endif()
add_library(libprotobuf-lite ${protobuf_SHARED_OR_STATIC} add_library(libprotobuf-lite ${protobuf_SHARED_OR_STATIC}
${libprotobuf_lite_files} ${libprotobuf_lite_includes} ${libprotobuf_lite_rc_files}) ${libprotobuf_lite_files} ${libprotobuf_lite_includes} ${libprotobuf_lite_rc_files})
......
...@@ -112,9 +112,11 @@ set(libprotobuf_includes ...@@ -112,9 +112,11 @@ set(libprotobuf_includes
${protobuf_source_dir}/src/google/protobuf/wrappers.pb.h ${protobuf_source_dir}/src/google/protobuf/wrappers.pb.h
) )
if (MSVC)
set(libprotobuf_rc_files set(libprotobuf_rc_files
${CMAKE_CURRENT_BINARY_DIR}/version.rc ${CMAKE_CURRENT_BINARY_DIR}/version.rc
) )
endif()
add_library(libprotobuf ${protobuf_SHARED_OR_STATIC} add_library(libprotobuf ${protobuf_SHARED_OR_STATIC}
${libprotobuf_lite_files} ${libprotobuf_files} ${libprotobuf_includes} ${libprotobuf_rc_files}) ${libprotobuf_lite_files} ${libprotobuf_files} ${libprotobuf_includes} ${libprotobuf_rc_files})
......
...@@ -161,9 +161,11 @@ set(libprotoc_headers ...@@ -161,9 +161,11 @@ set(libprotoc_headers
${protobuf_source_dir}/src/google/protobuf/compiler/zip_writer.h ${protobuf_source_dir}/src/google/protobuf/compiler/zip_writer.h
) )
if (MSVC)
set(libprotoc_rc_files set(libprotoc_rc_files
${CMAKE_CURRENT_BINARY_DIR}/version.rc ${CMAKE_CURRENT_BINARY_DIR}/version.rc
) )
endif()
set(js_well_known_types_sources set(js_well_known_types_sources
${protobuf_source_dir}/src/google/protobuf/compiler/js/well_known_types/any.js ${protobuf_source_dir}/src/google/protobuf/compiler/js/well_known_types/any.js
......
...@@ -2,9 +2,11 @@ set(protoc_files ...@@ -2,9 +2,11 @@ set(protoc_files
${protobuf_source_dir}/src/google/protobuf/compiler/main.cc ${protobuf_source_dir}/src/google/protobuf/compiler/main.cc
) )
if (MSVC)
set(protoc_rc_files set(protoc_rc_files
${CMAKE_CURRENT_BINARY_DIR}/version.rc ${CMAKE_CURRENT_BINARY_DIR}/version.rc
) )
endif()
add_executable(protoc ${protoc_files} ${protoc_rc_files}) add_executable(protoc ${protoc_files} ${protoc_rc_files})
target_link_libraries(protoc libprotobuf libprotoc) target_link_libraries(protoc libprotobuf libprotoc)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment