Skip to content

Commit 04f05d8

Browse files
committed
Update CMakeLists.txt and pyproject.toml for Windows architecture handling and installation path adjustments
1 parent 1792805 commit 04f05d8

File tree

7 files changed

+14
-12
lines changed

7 files changed

+14
-12
lines changed

.github/workflows/wheels.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
run: |
6666
${{ env.VCPKG_ROOT }}/vcpkg install --triplet=x86-windows-static
6767
call .venv\Scripts\activate.bat
68-
set WIN_ARCH='x86'
68+
set WIN_ARCH=x86
6969
cibuildwheel . --platform windows --archs x86
7070
shell: cmd
7171

@@ -74,7 +74,7 @@ jobs:
7474
run: |
7575
${{ env.VCPKG_ROOT }}/vcpkg install --triplet=x64-windows-static
7676
call .venv\Scripts\activate.bat
77-
set WIN_ARCH='x64'
77+
set WIN_ARCH=x64
7878
cibuildwheel . --platform windows --archs AMD64
7979
shell: cmd
8080

CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ set(CMAKE_VERBOSE_MAKEFILE on)
1111
# If CLion is used for the build process, be sure to add the argument to
1212
# the "CMake profile" under "CMake options".
1313
if(WIN32)
14+
message("Running on Windows.")
1415
set(PLATFORM WINDOWS)
1516
# The vcpkg target triplet has to be set BEFORE the project() function
1617
# of CMake!
@@ -20,8 +21,10 @@ if(WIN32)
2021
# accordingly.
2122
if($ENV{WIN_ARCH} STREQUAL "x86")
2223
set(VCPKG_TARGET_TRIPLET x86-windows-static)
24+
set(ARCH_SPECIFIC_LIB_DIR ${CMAKE_SOURCE_DIR}/pre-built/windows/libx86)
2325
elseif($ENV{WIN_ARCH} STREQUAL "x64")
2426
set(VCPKG_TARGET_TRIPLET x64-windows-static)
27+
set(ARCH_SPECIFIC_LIB_DIR ${CMAKE_SOURCE_DIR}/pre-built/windows/libx64)
2528
endif()
2629
else()
2730
message(FATAL_ERROR "WIN_ARCH environment variable is not defined")
@@ -59,7 +62,7 @@ if (${PLATFORM} STREQUAL "WINDOWS")
5962

6063
set(LIB_DIR
6164
${CMAKE_SOURCE_DIR}/vcpkg_installed/${VCPKG_TARGET_TRIPLET}/lib
62-
${CMAKE_SOURCE_DIR}/pre-built/windows/libx64
65+
${ARCH_SPECIFIC_LIB_DIR}
6366
)
6467
set(ALL_COMPILER_ARGS
6568
/MP
@@ -422,7 +425,6 @@ target_include_directories(_cmd PUBLIC ${ALL_INCLUDE_DIR})
422425
# ----- Packages section
423426
# The variable for the Python target is needed, otherwise CLion
424427
# does not recognize the build target as valid target and therefore CMake fails.
425-
set(PY_LIB )
426428
find_package(freetype CONFIG REQUIRED)
427429
find_package(glew CONFIG REQUIRED)
428430
find_package(PNG CONFIG REQUIRED)

pre-built/windows/libx64/AdvAPI32.Lib

178 KB
Binary file not shown.

pre-built/windows/libx64/OpenGL32.Lib

-73.4 KB
Binary file not shown.

pre-built/windows/libx86/AdvAPI32.Lib

187 KB
Binary file not shown.

pre-built/windows/libx86/WS2_32.Lib

234 KB
Binary file not shown.

pyproject.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ build.verbose = true
4646
logging.level = "DEBUG"
4747
cmake.args = [
4848
"-DCMAKE_TOOLCHAIN_FILE=./vendor/vcpkg/scripts/buildsystems/vcpkg.cmake",
49-
"-DVCPKG_INSTALLED_DIR=./vcpkg_installed",
49+
"-DVCPKG_INSTALLED_DIR=./cmake-build-release",
5050
"-DBUILD_PYTHON_EXTENSION=ON"
5151
]
5252
sdist.include = [
@@ -80,10 +80,10 @@ before-all = "yum install -y perl perl-IPC-Cmd zip"
8080
#manylinux-x86_64-image = "manylinux2014"
8181
manylinux-x86_64-image = "manylinux_2_28"
8282

83-
[tool.cibuildwheel.windows]
84-
repair-wheel-command = """\
85-
delvewheel repair \
86-
-v \
87-
--wheel-dir={dest_dir} \
88-
{wheel} \
89-
"""
83+
#[tool.cibuildwheel.windows]
84+
#repair-wheel-command = """\
85+
# delvewheel repair \
86+
# -v \
87+
# --wheel-dir={dest_dir} \
88+
# {wheel} \
89+
#"""

0 commit comments

Comments
 (0)