This is an automated email from the ASF dual-hosted git repository.
xyz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pulsar-client-cpp.git
The following commit(s) were added to refs/heads/main by this push:
new b242e1a Fix broken cpp-build-windows workflow (#316)
b242e1a is described below
commit b242e1a0d8f316730ed5bfdd792c471ab2b6680c
Author: Yunze Xu <[email protected]>
AuthorDate: Thu Sep 14 11:37:19 2023 +0800
Fix broken cpp-build-windows workflow (#316)
Fixes https://github.com/apache/pulsar-client-cpp/issues/307
### Modifications
Use the `vcpkg_installed/<triplet>` directory as the `OPENSSL_ROOT_DIR`,
for debug build, add the `vcpkg_installed/<triplet>/debug` directory as
well.
---
CMakeLists.txt | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cde4966..c1e7a79 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -40,11 +40,14 @@ if (VCPKG_TRIPLET)
message(STATUS "Use CMAKE_PREFIX_PATH: ${CMAKE_PREFIX_PATH}")
set(PROTOC_PATH "${CMAKE_PREFIX_PATH}/tools/protobuf/protoc")
message(STATUS "Use protoc: ${PROTOC_PATH}")
- set(VCPKG_DEBUG_ROOT
"${PROJECT_SOURCE_DIR}/vcpkg_installed/${VCPKG_TRIPLET}/debug")
+ set(VCPKG_ROOT "${PROJECT_SOURCE_DIR}/vcpkg_installed/${VCPKG_TRIPLET}")
+ set(VCPKG_DEBUG_ROOT "${VCPKG_ROOT}/debug")
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
set(ZLIB_ROOT ${VCPKG_DEBUG_ROOT})
- set(OPENSSL_ROOT_DIR ${VCPKG_DEBUG_ROOT})
+ set(OPENSSL_ROOT_DIR ${VCPKG_ROOT} ${VCPKG_DEBUG_ROOT})
set(CMAKE_PREFIX_PATH ${VCPKG_DEBUG_ROOT} ${CMAKE_PREFIX_PATH})
+ else ()
+ set(OPENSSL_ROOT_DIR ${VCPKG_ROOT})
endif ()
if (VCPKG_TRIPLET MATCHES ".*-static")
set(LINK_STATIC ON)