vcpkg/ports/cgal/portfile.cmake

35 lines
1.0 KiB
CMake
Raw Normal View History

2017-10-14 12:25:18 +08:00
include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO CGAL/cgal
2018-02-27 23:35:15 +08:00
REF releases/CGAL-4.11.1
2018-03-05 12:22:45 +08:00
SHA512 51e5d239a0ee62ec6508aea5c696ba74278992343f196e40fe2159ad309ed907443ec0bd2ff96f51d9e34d2b89f164873e7bcb204cdd2c9f4800cea72a5b0094
2017-10-14 12:25:18 +08:00
HEAD_REF master
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DCGAL_INSTALL_CMAKE_DIR=share/cgal
2017-10-14 12:25:18 +08:00
)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets()
2017-10-14 12:25:18 +08:00
vcpkg_copy_pdbs()
# Clean
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
file(READ ${CURRENT_PACKAGES_DIR}/share/cgal/CGALConfig.cmake _contents)
string(REPLACE "CGAL_IGNORE_PRECONFIGURED_GMP" "1" _contents "${_contents}")
string(REPLACE "CGAL_IGNORE_PRECONFIGURED_MPFR" "1" _contents "${_contents}")
file(WRITE ${CURRENT_PACKAGES_DIR}/share/cgal/CGALConfig.cmake "${_contents}")
2017-10-14 12:25:18 +08:00
# Handle copyright of suitesparse and metis
file(COPY ${SOURCE_PATH}/copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/cgal)