2017-06-11 05:53:46 +08:00
|
|
|
include(vcpkg_common_functions)
|
|
|
|
|
|
|
|
vcpkg_from_github(
|
2017-06-21 23:21:29 +08:00
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
2017-06-11 05:53:46 +08:00
|
|
|
REPO qhull/qhull
|
2020-06-19 06:18:12 +08:00
|
|
|
REF v8.0.0 # Qhull 2020.1
|
|
|
|
SHA512 b6ac17193b7c8a4ffb5f5a64cc057d1d5123f155f1c4fcd290fe1768356fef5c58d511707bba8c4814ca754bc6cdf5c370af23953d00c24a5ec28b8a1e489d31
|
2017-06-21 23:21:29 +08:00
|
|
|
HEAD_REF master
|
2020-01-14 03:34:35 +08:00
|
|
|
PATCHES
|
|
|
|
mac-fix.patch
|
2017-06-11 05:53:46 +08:00
|
|
|
)
|
2020-06-19 06:18:12 +08:00
|
|
|
if(${TARGET_TRIPLET} STREQUAL "x64-windows-static")
|
2019-03-15 05:38:17 +08:00
|
|
|
# workaround for visual studio toolset regression LNK1201 (remove if solved)
|
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
2020-06-19 06:18:12 +08:00
|
|
|
OPTIONS
|
2019-03-15 05:38:17 +08:00
|
|
|
-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()
|
2017-06-11 05:53:46 +08:00
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
2017-11-26 06:29:56 +08:00
|
|
|
PREFER_NINJA
|
2020-06-19 06:18:12 +08:00
|
|
|
OPTIONS
|
2017-06-21 23:21:29 +08:00
|
|
|
-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
|
2017-06-11 05:53:46 +08:00
|
|
|
)
|
2019-03-15 05:38:17 +08:00
|
|
|
endif()
|
2017-06-11 05:53:46 +08:00
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
2017-06-21 23:21:29 +08:00
|
|
|
|
2020-06-19 06:18:12 +08:00
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Qhull)
|
2019-07-22 14:28:04 +08:00
|
|
|
|
2017-06-11 05:53:46 +08:00
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
|
|
|
file(GLOB_RECURSE HTMFILES ${CURRENT_PACKAGES_DIR}/include/*.htm)
|
|
|
|
file(REMOVE ${HTMFILES})
|
2017-06-21 23:21:29 +08:00
|
|
|
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)
|
2019-03-15 05:38:17 +08:00
|
|
|
if(EXEFILES_RELEASE OR EXEFILES_DEBUG)
|
|
|
|
file(REMOVE ${EXEFILES_RELEASE} ${EXEFILES_DEBUG})
|
|
|
|
endif()
|
2017-06-21 23:21:29 +08:00
|
|
|
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
|
|
|
|
file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/qhull.lib ${CURRENT_PACKAGES_DIR}/debug/lib/qhull_d.lib)
|
|
|
|
file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/qhull_p.lib ${CURRENT_PACKAGES_DIR}/debug/lib/qhull_pd.lib)
|
|
|
|
file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/qhull_r.lib ${CURRENT_PACKAGES_DIR}/debug/lib/qhull_rd.lib)
|
2017-11-26 06:34:19 +08:00
|
|
|
else()
|
|
|
|
file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/qhullcpp.lib ${CURRENT_PACKAGES_DIR}/debug/lib/qhullcpp_d.lib)
|
|
|
|
file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/qhullstatic.lib ${CURRENT_PACKAGES_DIR}/debug/lib/qhullstatic_d.lib)
|
|
|
|
file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/qhullstatic_r.lib ${CURRENT_PACKAGES_DIR}/debug/lib/qhullstatic_rd.lib)
|
2017-06-21 23:21:29 +08:00
|
|
|
endif()
|
2017-06-11 05:53:46 +08:00
|
|
|
|
|
|
|
file(COPY ${SOURCE_PATH}/README.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/qhull)
|
|
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/share/qhull/README.txt ${CURRENT_PACKAGES_DIR}/share/qhull/copyright)
|