Skip to content

Commit cd2c7f0

Browse files
committed
Tryfix openssl
1 parent 1a8d36d commit cd2c7f0

3 files changed

Lines changed: 21 additions & 11 deletions

File tree

.github/workflows/wheel-build.yaml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -134,16 +134,7 @@ jobs:
134134
shell: bash
135135
run: git clone https://github.com/microsoft/vcpkg.git && cd vcpkg && git checkout 6f29f12e82a8293156836ad81cc9bf5af41fe836 && ./bootstrap-vcpkg.sh
136136

137-
- name: install vcpkg dependencies
138-
shell: bash
139-
env:
140-
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
141-
VCPKG_TARGET_TRIPLET: ${{ steps.platform-name.outputs.triplet }}
142-
VCPKG_HOST_TRIPLET: ${{ steps.platform-name.outputs.triplet }}
143-
run: |
144-
cd vcpkg
145-
./vcpkg install --triplet=${{ steps.platform-name.outputs.triplet }} openssl liblzma libiconv zlib
146-
cd ..
137+
147138

148139
- name: clean build artifacts
149140
shell: bash

cpp/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ endif()
1818
set(CMAKE_TOOLCHAIN_FILE "$ENV{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" CACHE STRING "Vcpkg toolchain file")
1919
message(STATUS "Using toolchain file: ${CMAKE_TOOLCHAIN_FILE}")
2020

21+
# Include vcpkg toolchain BEFORE project() so it can set up search paths
22+
include("$ENV{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake")
23+
2124
project(deepframe_project LANGUAGES CXX)
2225

2326
# Verify cross-compilation setup

scripts/build.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,23 @@ def build(mode):
1010
build_path = f'build/{mode}'
1111
os.makedirs(build_path, exist_ok=True)
1212
os.chdir(build_path)
13-
os.system(f'cmake -DPYTHON_EXECUTABLE={sys.executable} -DCMAKE_BUILD_TYPE={supported_modes_[mode]} -DCMAKE_INSTALL_PREFIX=../../deepframe ../../cpp')
13+
14+
# Get vcpkg environment variables
15+
vcpkg_target_triplet = os.environ.get('VCPKG_TARGET_TRIPLET', '')
16+
vcpkg_host_triplet = os.environ.get('VCPKG_HOST_TRIPLET', '')
17+
18+
# Build cmake command with vcpkg variables
19+
cmake_cmd = f'cmake -DPYTHON_EXECUTABLE={sys.executable} -DCMAKE_BUILD_TYPE={supported_modes_[mode]} -DCMAKE_INSTALL_PREFIX=../../deepframe'
20+
21+
if vcpkg_target_triplet:
22+
cmake_cmd += f' -DVCPKG_TARGET_TRIPLET={vcpkg_target_triplet}'
23+
if vcpkg_host_triplet:
24+
cmake_cmd += f' -DVCPKG_HOST_TRIPLET={vcpkg_host_triplet}'
25+
26+
cmake_cmd += ' ../../cpp'
27+
28+
print(f"Running: {cmake_cmd}")
29+
os.system(cmake_cmd)
1430
os.system('make install')
1531

1632
if __name__ == '__main__':

0 commit comments

Comments
 (0)