From 683d8a8820680fc017d0faef08bac490f68e781e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20M=C3=BCller?= Date: Sat, 20 May 2017 10:58:30 +0200 Subject: Add warning for unsupported linkage combination Don't remove source directories Install Python's standard library --- ports/python3/portfile.cmake | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'ports/python3') diff --git a/ports/python3/portfile.cmake b/ports/python3/portfile.cmake index d3ffbfa24..19f04a15d 100644 --- a/ports/python3/portfile.cmake +++ b/ports/python3/portfile.cmake @@ -9,6 +9,13 @@ # VCPKG_ROOT_DIR = # 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() + include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}) @@ -20,7 +27,6 @@ vcpkg_from_github( HEAD_REF master ) # We need per-triplet directories because we need to patch the project files differently based on the linkage -file(REMOVE_RECURSE ${SOURCE_PATH}) file(COPY ${TEMP_SOURCE_PATH} DESTINATION ${SOURCE_PATH}) set(SOURCE_PATH ${SOURCE_PATH}/cpython-3.6.1) @@ -64,6 +70,8 @@ endif() file(GLOB HEADERS ${SOURCE_PATH}/Include/*.h) file(COPY ${HEADERS} ${SOURCE_PATH}/PC/pyconfig.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/python3.6) +file(COPY ${SOURCE_PATH}/Lib DESTINATION ${CURRENT_PACKAGES_DIR}/share/python3) + file(COPY ${SOURCE_PATH}/PCBuild/${OUT_DIR}/python36.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) file(COPY ${SOURCE_PATH}/PCBuild/${OUT_DIR}/python36_d.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) -- cgit v1.2.3