Skip to content

Commit c6f4eb3

Browse files
authored
Merge pull request #1185 from openziti/win32-build-split
win32 build: produce two flavors - openssl and win32crypto
2 parents ee41a4e + 72701b6 commit c6f4eb3

File tree

4 files changed

+26
-3
lines changed

4 files changed

+26
-3
lines changed

.github/workflows/cmake.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ jobs:
3030
name: Windows x86_64
3131
preset: windows-x64-mingw
3232

33+
- os: windows-latest
34+
name: Windows x86_64(win32crypto)
35+
preset: windows-x64-win32crypto
36+
3337
- os: windows-latest
3438
name: Windows arm64
3539
preset: windows-arm64-vs2022

CMakeLists.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,14 +137,19 @@ add_custom_target(bundle
137137

138138
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/bundle)
139139

140+
message(NOTICE "tlsuv = ${TLSUV_TLSLIB}")
141+
if (TLSUV_TLSLIB AND NOT TLSUV_TLSLIB STREQUAL "openssl")
142+
set(comp-flavor "-${TLSUV_TLSLIB}")
143+
message(NOTICE "binary marker: ${comp-flavor}")
144+
endif ()
140145
macro(BUNDLE_COMP comp)
141146
add_custom_target(${comp}-bundle
142-
BYPRODUCTS ${CMAKE_BINARY_DIR}/bundle/${comp}-${CMAKE_SYSTEM_NAME}_${CMAKE_SYSTEM_PROCESSOR}.zip
147+
BYPRODUCTS ${CMAKE_BINARY_DIR}/bundle/${comp}${comp-flavor}-${CMAKE_SYSTEM_NAME}_${CMAKE_SYSTEM_PROCESSOR}.zip
143148
DEPENDS ${comp}
144149
# use generator expression to set working directory to the target's build directory. this works for multi-config generators, e.g. when "--config" is specified at build time.
145150
WORKING_DIRECTORY "$<TARGET_FILE_DIR:${comp}>"
146151
COMMENT "adding components to bundle ${comp} for ${CMAKE_SYSTEM_NAME}:${CMAKE_SYSTEM_PROCESSOR}: $<TARGET_FILE_NAME:${comp}> ${${comp}_BUNDLE_COMPS}"
147-
COMMAND ${CMAKE_COMMAND} -E tar "cf" "${CMAKE_BINARY_DIR}/bundle/${comp}-${CMAKE_SYSTEM_NAME}_${CMAKE_SYSTEM_PROCESSOR}.zip" --format=zip -- $<TARGET_FILE_NAME:${comp}> ${${comp}_BUNDLE_COMPS})
152+
COMMAND ${CMAKE_COMMAND} -E tar "cf" "${CMAKE_BINARY_DIR}/bundle/${comp}${comp-flavor}-${CMAKE_SYSTEM_NAME}_${CMAKE_SYSTEM_PROCESSOR}.zip" --format=zip -- $<TARGET_FILE_NAME:${comp}> ${${comp}_BUNDLE_COMPS})
148153
add_dependencies(bundle ${comp}-bundle)
149154
endmacro()
150155

CMakePresets.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@
150150
"binaryDir": "${sourceDir}/build",
151151
"hidden": true,
152152
"cacheVariables": {
153+
"TLSUV_TLSLIB": "openssl",
153154
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
154155
}
155156
},
@@ -266,6 +267,20 @@
266267
"vcpkg",
267268
"vcpkg-win64-mingw-static"
268269
]
270+
},
271+
{
272+
"name": "ci-windows-x64-win32crypto",
273+
"inherits": [
274+
"ci-build",
275+
"ci-win64-mingw",
276+
"dev-mode",
277+
"vcpkg",
278+
"vcpkg-win64-mingw-static"
279+
],
280+
"cacheVariables": {
281+
"TLSUV_TLSLIB": "win32crypto"
282+
}
269283
}
284+
270285
]
271286
}

vcpkg.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
},
1313
{
1414
"name": "openssl",
15-
"platform": "!windows & !mingw",
1615
"$comment": "on linux we use system installed OpenSSL, as determined by vcpkg-overlays/linux-syslibs)"
1716
},
1817
"json-c",

0 commit comments

Comments
 (0)