Skip to content

Commit 232f300

Browse files
committed
windows: assemble OPENSSL_LIBS from discovered libraries
Build the OPENSSL_LIBS environment variable with an explicit join instead of relying on PowerShell interpolation. This keeps openssl-sys from seeing a literal variable name in package and static-integration builds.
1 parent dff39dd commit 232f300

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ ifeq ($(OS_TYPE),windows)
309309
if ($$opensslSslLibPath -and $$opensslCryptoLibPath) { \
310310
$$opensslSslLibName = [System.IO.Path]::GetFileNameWithoutExtension($$opensslSslLibPath); \
311311
$$opensslCryptoLibName = [System.IO.Path]::GetFileNameWithoutExtension($$opensslCryptoLibPath); \
312-
$$env:OPENSSL_LIBS = \"$$opensslSslLibName`:`$$opensslCryptoLibName\"; \
312+
$$env:OPENSSL_LIBS = [string]::Join(':', @($$opensslSslLibName, $$opensslCryptoLibName)); \
313313
} \
314314
}; \
315315
cmake --build build-static --config Release; \
@@ -430,7 +430,7 @@ ifeq ($(OS_TYPE),windows)
430430
if ($$opensslSslLibPath -and $$opensslCryptoLibPath) { \
431431
$$opensslSslLibName = [System.IO.Path]::GetFileNameWithoutExtension($$opensslSslLibPath); \
432432
$$opensslCryptoLibName = [System.IO.Path]::GetFileNameWithoutExtension($$opensslCryptoLibPath); \
433-
$$env:OPENSSL_LIBS = \"$$opensslSslLibName`:`$$opensslCryptoLibName\"; \
433+
$$env:OPENSSL_LIBS = [string]::Join(':', @($$opensslSslLibName, $$opensslCryptoLibName)); \
434434
} \
435435
}; \
436436
cmake --build build --config $(CMAKE_BUILD_TYPE); \

0 commit comments

Comments
 (0)