Skip to content

Commit

Permalink
adding cibuildwheel repair command for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
stephen-dixon committed Aug 5, 2024
1 parent 1071768 commit a65b176
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@ jobs:
-DNO_IDL_WRAPPER=ON
-DNO_MEMCACHE=ON
-DCMAKE_INSTALL_PREFIX=install
&& cp C:/vcpkg/installed/x64-windows-static-md/include/iconv.h C:/vcpkg/installed/x64-windows-static-md/include/libxml2/libxml/
&& cp C:/vcpkg/installed/x64-windows-static-md/include/iconv.h ./source/structures/
&& cmake --build build -j --config Release
&& cmake --install build --config Release
&& ls install/lib
Expand All @@ -114,6 +112,10 @@ jobs:
# && Add-Content -Path ./build/CMakeCache.txt -Value "Iconv_INCLUDE_DIR:PATH=C:/vcpkg/installed/x64-windows-static-md/include"
# && cp C:/vcpkg/installed/x64-windows-static-md/include/iconv.h C:/vcpkg/installed/x64-windows-static-md/include/libxml2/libxml/
# && cp C:/vcpkg/installed/x64-windows-static-md/include/iconv.h ./source/structures/
# - name: test pyuda on windows
# if: runner.os == 'Windows'
# env:
Expand Down Expand Up @@ -141,6 +143,7 @@ jobs:
CIBW_ARCHS: ${{matrix.build-platform[1]}}
CIBW_PLATFORM: windows
CIBW_BUILD: cp*-${{matrix.build-platform[2]}}
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair -w {dest_dir} {wheel} --add-path ${{github.workspace}}/install/lib"


- name: Build manylinux2014 wheels
Expand Down
6 changes: 5 additions & 1 deletion source/structures/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ else()
endif()

find_package( LibXml2 REQUIRED )
if ( WIN32 )
find_package( Iconv REQUIRED )
message( "ICONV INCLUDE DIR: ${Iconv_INCLUDE_DIR}" )
endif()

########################################################################################################################
# Sources
Expand All @@ -28,7 +32,7 @@ include_directories(
)

if( MINGW OR WIN32 )
include_directories( ${XDR_INCLUDE_DIR} )
include_directories( ${XDR_INCLUDE_DIR} ${Iconv_INCLUDE_DIR} )
# add_compile_options( -Wno-error=use-after-free )
elseif( TIRPC_FOUND )
include_directories( ${TIRPC_INCLUDE_DIR} )
Expand Down

0 comments on commit a65b176

Please sign in to comment.