aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2017-10-23 13:05:58 -0700
committerGitHub <noreply@github.com>2017-10-23 13:05:58 -0700
commit90a3a8a3afef435d5cfb68b2e16010c2329c55a6 (patch)
tree16be3bc8c9d602b53f84d85c61127a3a22067693
parenta33c8809663b2c0f332e4a142da3d0ec68091bd6 (diff)
parent4ce8f0aa31da63f84fc81dfd895faaeb03d5c7b1 (diff)
downloadvcpkg-90a3a8a3afef435d5cfb68b2e16010c2329c55a6.tar.gz
vcpkg-90a3a8a3afef435d5cfb68b2e16010c2329c55a6.zip
Merge pull request #1972 from jasjuang/cgal
new port: cgal
-rw-r--r--ports/cgal/CONTROL4
-rw-r--r--ports/cgal/portfile.cmake26
-rw-r--r--scripts/cmake/vcpkg_from_github.cmake1
3 files changed, 31 insertions, 0 deletions
diff --git a/ports/cgal/CONTROL b/ports/cgal/CONTROL
new file mode 100644
index 000000000..d6d01956d
--- /dev/null
+++ b/ports/cgal/CONTROL
@@ -0,0 +1,4 @@
+Source: cgal
+Version: 4.11
+Build-Depends:mpfr, mpir, zlib, boost, qt5
+Description: The Computational Geometry Algorithms Library (CGAL) is a C++ library that aims to provide easy access to efficient and reliable algorithms in computational geometry.
diff --git a/ports/cgal/portfile.cmake b/ports/cgal/portfile.cmake
new file mode 100644
index 000000000..c55d0ba3e
--- /dev/null
+++ b/ports/cgal/portfile.cmake
@@ -0,0 +1,26 @@
+include(vcpkg_common_functions)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO CGAL/cgal
+ REF releases/CGAL-4.11
+ SHA512 91e555d5988bee387afa31331e1e3a8990206468fd8c774fd82979d9ff169e9c4835ecc6ba3d576cda617b6cb2cd52d27657d2434e38b29ce0e7e643436810ab
+ HEAD_REF master
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+)
+
+vcpkg_install_cmake()
+
+vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/CGAL")
+
+vcpkg_copy_pdbs()
+
+# Clean
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
+
+# Handle copyright of suitesparse and metis
+file(COPY ${SOURCE_PATH}/copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/cgal)
diff --git a/scripts/cmake/vcpkg_from_github.cmake b/scripts/cmake/vcpkg_from_github.cmake
index 645690353..d14077410 100644
--- a/scripts/cmake/vcpkg_from_github.cmake
+++ b/scripts/cmake/vcpkg_from_github.cmake
@@ -80,6 +80,7 @@ function(vcpkg_from_github)
else()
# Sometimes GitHub strips a leading 'v' off the REF.
string(REGEX REPLACE "^v" "" REF ${BASEREF})
+ string(REPLACE "/" "-" REF ${REF})
set(SOURCE_PATH "${BASE}/${REPO_NAME}-${REF}")
if(EXISTS ${SOURCE_PATH})
set(${_vdud_OUT_SOURCE_PATH} "${SOURCE_PATH}" PARENT_SCOPE)