From 1feb0dc3d884d5bef0896a0ba3d2c09b3dfecdcd Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Thu, 14 Mar 2019 22:38:17 +0100 Subject: [PATCH] workaround for qhull regression in static build see #5574 --- ports/qhull/CONTROL | 2 +- ports/qhull/portfile.cmake | 20 ++++++++++++++++++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/ports/qhull/CONTROL b/ports/qhull/CONTROL index 337ac13c36..f14eb4344f 100644 --- a/ports/qhull/CONTROL +++ b/ports/qhull/CONTROL @@ -1,3 +1,3 @@ Source: qhull -Version: 7.2.1-2 +Version: 7.2.1-3 Description: computes the convex hull, Delaunay triangulation, Voronoi diagram diff --git a/ports/qhull/portfile.cmake b/ports/qhull/portfile.cmake index 04fadcf8d2..b7939dddb7 100644 --- a/ports/qhull/portfile.cmake +++ b/ports/qhull/portfile.cmake @@ -7,7 +7,20 @@ vcpkg_from_github( SHA512 8f5177ea45f82fa28f13e95105497e7e29086d7301e1cb8d3860fff09ebf8d0f01cfcb0f044c422f0ac0ba94b845bba223232e5eeb613bf671f65a569b8766d0 HEAD_REF master ) - +if(${TARGET_TRIPLET} STREQUAL "x64-windows-static") +# workaround for visual studio toolset regression LNK1201 (remove if solved) +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DINCLUDE_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/include + -DMAN_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/doc/qhull + -DDOC_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/doc/qhull + OPTIONS_RELEASE + -DLIB_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/lib + OPTIONS_DEBUG + -DLIB_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/debug/lib +) +else() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -20,6 +33,7 @@ vcpkg_configure_cmake( OPTIONS_DEBUG -DLIB_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/debug/lib ) +endif() vcpkg_install_cmake() @@ -31,7 +45,9 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/doc) file(GLOB EXEFILES_RELEASE ${CURRENT_PACKAGES_DIR}/bin/*.exe) file(GLOB EXEFILES_DEBUG ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) file(COPY ${EXEFILES_RELEASE} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qhull) -file(REMOVE ${EXEFILES_RELEASE} ${EXEFILES_DEBUG}) +if(EXEFILES_RELEASE OR EXEFILES_DEBUG) + file(REMOVE ${EXEFILES_RELEASE} ${EXEFILES_DEBUG}) +endif() if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)