2017-06-11 05:53:46 +08:00
|
|
|
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-09-12 03:44:26 +08:00
|
|
|
REF 613debeaea72ee66626dace9ba1a2eff11b5d37d
|
|
|
|
SHA512 5b8ff9665ba73621a9859a6e86717b980b67f8d79d6c78cbf5672bce66aed671f7d64fcbec457bca79eef2e17e105f136017afdf442bb430b9f4a059d7cb93c3
|
2017-06-21 23:21:29 +08:00
|
|
|
HEAD_REF master
|
2021-08-05 18:05:30 +08:00
|
|
|
PATCHES
|
|
|
|
include-qhullcpp-shared.patch
|
|
|
|
fix-missing-symbols.patch # upstream https://github.com/qhull/qhull/pull/93
|
2019-03-15 05:38:17 +08:00
|
|
|
)
|
2020-09-12 03:44:26 +08:00
|
|
|
|
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC_LIBS)
|
|
|
|
|
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
|
2020-09-12 03:44:26 +08:00
|
|
|
-DBUILD_STATIC_LIBS=${BUILD_STATIC_LIBS}
|
2017-06-11 05:53:46 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
2017-06-21 23:21:29 +08:00
|
|
|
|
2020-09-12 03:44:26 +08:00
|
|
|
file(REMOVE_RECURSE
|
|
|
|
${CURRENT_PACKAGES_DIR}/share/man
|
|
|
|
${CURRENT_PACKAGES_DIR}/share/doc
|
|
|
|
${CURRENT_PACKAGES_DIR}/debug/include
|
|
|
|
${CURRENT_PACKAGES_DIR}/debug/share/man
|
|
|
|
${CURRENT_PACKAGES_DIR}/debug/share/doc
|
|
|
|
)
|
2017-06-21 23:21:29 +08:00
|
|
|
|
2020-09-12 03:44:26 +08:00
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Qhull)
|
|
|
|
file(REMOVE
|
|
|
|
${CURRENT_PACKAGES_DIR}/lib/pkgconfig/qhullstatic.pc
|
|
|
|
${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/qhullstatic_d.pc
|
|
|
|
)
|
2017-06-21 23:21:29 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
2020-09-12 03:44:26 +08:00
|
|
|
file(REMOVE
|
|
|
|
${CURRENT_PACKAGES_DIR}/lib/pkgconfig/qhull_r.pc
|
|
|
|
${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/qhull_rd.pc
|
|
|
|
)
|
2017-11-26 06:34:19 +08:00
|
|
|
else()
|
2020-09-12 03:44:26 +08:00
|
|
|
file(REMOVE
|
|
|
|
${CURRENT_PACKAGES_DIR}/lib/pkgconfig/qhullstatic_r.pc
|
|
|
|
${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/qhullstatic_rd.pc
|
|
|
|
)
|
2017-06-21 23:21:29 +08:00
|
|
|
endif()
|
2020-09-12 03:44:26 +08:00
|
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
|
|
|
|
vcpkg_copy_tools(TOOL_NAMES
|
|
|
|
qconvex
|
|
|
|
qdelaunay
|
|
|
|
qhalf
|
|
|
|
qhull
|
|
|
|
qvoronoi
|
|
|
|
rbox
|
|
|
|
AUTO_CLEAN
|
|
|
|
)
|
2017-06-11 05:53:46 +08:00
|
|
|
|
2020-09-12 03:44:26 +08:00
|
|
|
file(INSTALL ${SOURCE_PATH}/README.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|