aboutsummaryrefslogtreecommitdiff
path: root/ports/python3/portfile.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'ports/python3/portfile.cmake')
-rw-r--r--ports/python3/portfile.cmake25
1 files changed, 10 insertions, 15 deletions
diff --git a/ports/python3/portfile.cmake b/ports/python3/portfile.cmake
index 9bb50b70c..6285f9a9b 100644
--- a/ports/python3/portfile.cmake
+++ b/ports/python3/portfile.cmake
@@ -1,17 +1,4 @@
-# Common Ambient Variables:
-# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
-# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
-# CURRENT_PORT DIR = ${VCPKG_ROOT_DIR}\ports\${PORT}
-# PORT = current port name (zlib, etc)
-# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc)
-# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic)
-# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic)
-# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
-# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm)
-#
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic AND VCPKG_CRT_LINKAGE STREQUAL static)
- # Because the patches patch the same file, they have to be applied in the correct order
- # In this scenario, only the second patch needs to be applied, which doesn't work
message(STATUS "Warning: Dynamic library with static CRT is not supported. Building static library.")
set(VCPKG_LIBRARY_LINKAGE static)
endif()
@@ -29,8 +16,16 @@ vcpkg_from_github(
REF v${PYTHON_VERSION}
SHA512 32cca5e344ee66f08712ab5533e5518f724f978ec98d985f7612d0bd8d7f5cac25625363c9eead192faf1806d4ea3393515f72ba962a2a0bed26261e56d8c637
HEAD_REF master
- )
+)
+
+vcpkg_apply_patches(
+ SOURCE_PATH ${TEMP_SOURCE_PATH}
+ PATCHES
+ ${CMAKE_CURRENT_LIST_DIR}/0004-Fix-iomodule-for-RS4-SDK.patch
+)
+
# We need per-triplet directories because we need to patch the project files differently based on the linkage
+# Because the patches patch the same file, they have to be applied in the correct order
file(COPY ${TEMP_SOURCE_PATH} DESTINATION ${SOURCE_PATH})
set(SOURCE_PATH ${SOURCE_PATH}/cpython-${PYTHON_VERSION})
@@ -87,4 +82,4 @@ endif()
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/python${PYTHON_VERSION_MAJOR})
file(RENAME ${CURRENT_PACKAGES_DIR}/share/python${PYTHON_VERSION_MAJOR}/LICENSE ${CURRENT_PACKAGES_DIR}/share/python${PYTHON_VERSION_MAJOR}/copyright)
-vcpkg_copy_pdbs() \ No newline at end of file
+vcpkg_copy_pdbs()