This repository was archived by the owner on Dec 8, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,13 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
2727# spanner:
2828find_package (spanner_client REQUIRED)
2929
30+ # MSVC requires some additional code to select the correct runtime library
31+ if (VCPKG_TARGET_TRIPLET MATCHES "-static$" )
32+ set (CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>" )
33+ else ()
34+ set (CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL" )
35+ endif ()
36+
3037# Define your targets.
3138add_executable (quickstart quickstart.cc)
3239target_link_libraries (quickstart googleapis-c++::spanner_client)
Original file line number Diff line number Diff line change @@ -100,6 +100,10 @@ bazel build --copt=-DGRPC_BAZEL_BUILD ...
100100
101101### Windows
102102
103+ To correctly configure the MSVC runtime you should change the CMake minimum
104+ required version to 3.15 or add ` -DCMAKE_POLICY_DEFAULT_CMP0091=NEW ` to the
105+ CMake configuration step.
106+
103107gRPC [ requires] [ grpc-roots-pem-bug ] an environment variable to configure the trust store for SSL certificates, you
104108can download and configure this using:
105109
You can’t perform that action at this time.
0 commit comments