aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmake
diff options
context:
space:
mode:
authorGravatar Ivan Shynkarenka <chronoxor@gmail.com>2018-05-15 23:19:58 +0300
committerGravatar Ivan Shynkarenka <chronoxor@gmail.com>2018-05-15 23:19:58 +0300
commit291d9a0ab0b452537d22a81b551eaea53fd157a8 (patch)
treedbb4be8fb168e15e8375514e7c7253aeae5eec32 /cmake
parent5932547a6f7d5079a4ea0a2eba83748879bf6375 (diff)
Fix issue with version.rc
Diffstat (limited to 'cmake')
-rw-r--r--cmake/libprotobuf-lite.cmake2
-rw-r--r--cmake/libprotobuf.cmake2
-rw-r--r--cmake/libprotoc.cmake2
-rw-r--r--cmake/protoc.cmake2
4 files changed, 8 insertions, 0 deletions
diff --git a/cmake/libprotobuf-lite.cmake b/cmake/libprotobuf-lite.cmake
index 06621cb8..1d0b0b84 100644
--- a/cmake/libprotobuf-lite.cmake
+++ b/cmake/libprotobuf-lite.cmake
@@ -48,9 +48,11 @@ set(libprotobuf_lite_includes
${protobuf_source_dir}/src/google/protobuf/wire_format_lite.h
)
+if (MSVC)
set(libprotobuf_lite_rc_files
${CMAKE_CURRENT_BINARY_DIR}/version.rc
)
+endif()
add_library(libprotobuf-lite ${protobuf_SHARED_OR_STATIC}
${libprotobuf_lite_files} ${libprotobuf_lite_includes} ${libprotobuf_lite_rc_files})
diff --git a/cmake/libprotobuf.cmake b/cmake/libprotobuf.cmake
index a1fdf7c0..bd570be7 100644
--- a/cmake/libprotobuf.cmake
+++ b/cmake/libprotobuf.cmake
@@ -112,9 +112,11 @@ set(libprotobuf_includes
${protobuf_source_dir}/src/google/protobuf/wrappers.pb.h
)
+if (MSVC)
set(libprotobuf_rc_files
${CMAKE_CURRENT_BINARY_DIR}/version.rc
)
+endif()
add_library(libprotobuf ${protobuf_SHARED_OR_STATIC}
${libprotobuf_lite_files} ${libprotobuf_files} ${libprotobuf_includes} ${libprotobuf_rc_files})
diff --git a/cmake/libprotoc.cmake b/cmake/libprotoc.cmake
index 2d8b2322..04701818 100644
--- a/cmake/libprotoc.cmake
+++ b/cmake/libprotoc.cmake
@@ -161,9 +161,11 @@ set(libprotoc_headers
${protobuf_source_dir}/src/google/protobuf/compiler/zip_writer.h
)
+if (MSVC)
set(libprotoc_rc_files
${CMAKE_CURRENT_BINARY_DIR}/version.rc
)
+endif()
set(js_well_known_types_sources
${protobuf_source_dir}/src/google/protobuf/compiler/js/well_known_types/any.js
diff --git a/cmake/protoc.cmake b/cmake/protoc.cmake
index 9bf6f5a9..bb160f47 100644
--- a/cmake/protoc.cmake
+++ b/cmake/protoc.cmake
@@ -2,9 +2,11 @@ set(protoc_files
${protobuf_source_dir}/src/google/protobuf/compiler/main.cc
)
+if (MSVC)
set(protoc_rc_files
${CMAKE_CURRENT_BINARY_DIR}/version.rc
)
+endif()
add_executable(protoc ${protoc_files} ${protoc_rc_files})
target_link_libraries(protoc libprotobuf libprotoc)