aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2017-06-14 00:04:16 -0700
committerGitHub <noreply@github.com>2017-06-14 00:04:16 -0700
commitc5ac9898999b712b7bac2fbc497825882d5e9011 (patch)
treeb64edb2fe7d020661b3fe30213eef2a967a60fd3
parent5fa90f67cb9f2d20f366180f236856baf2331e52 (diff)
parentec625bc160748ea4b35c3c0c4fb7daa06b42de32 (diff)
downloadvcpkg-c5ac9898999b712b7bac2fbc497825882d5e9011.tar.gz
vcpkg-c5ac9898999b712b7bac2fbc497825882d5e9011.zip
Merge pull request #1263 from mmazat/master
Add qhull and flann ports, way to add pcl
-rw-r--r--ports/flann/CONTROL3
-rw-r--r--ports/flann/fix-install-flann.patch41
-rw-r--r--ports/flann/portfile.cmake51
-rw-r--r--ports/qhull/CONTROL3
-rw-r--r--ports/qhull/portfile.cmake46
5 files changed, 144 insertions, 0 deletions
diff --git a/ports/flann/CONTROL b/ports/flann/CONTROL
new file mode 100644
index 000000000..a4a5c4ddc
--- /dev/null
+++ b/ports/flann/CONTROL
@@ -0,0 +1,3 @@
+Source: flann
+Version: 1.9.1
+Description: performing fast approximate nearest neighbor searches in high dimensional spaces
diff --git a/ports/flann/fix-install-flann.patch b/ports/flann/fix-install-flann.patch
new file mode 100644
index 000000000..f65094e8f
--- /dev/null
+++ b/ports/flann/fix-install-flann.patch
@@ -0,0 +1,41 @@
+diff --git "a/src/cpp/CMakeLists.txt" "b/src/cpp/CMakeLists.txt"
+index 49c53f0..cc58c90 100644
+--- "a/src/cpp/CMakeLists.txt"
++++ "b/src/cpp/CMakeLists.txt"
+@@ -87,7 +87,7 @@ if (BUILD_C_BINDINGS)
+ set_target_properties(flann PROPERTIES LINKER_LANGUAGE CXX)
+ target_link_libraries(flann -Wl,-whole-archive flann_s -Wl,-no-whole-archive)
+ else()
+- add_library(flann SHARED ${C_SOURCES})
++ add_library(flann ${C_SOURCES})
+
+ if(MINGW AND OPENMP_FOUND)
+ target_link_libraries(flann gomp)
+@@ -111,12 +111,12 @@ endif()
+ endif(WIN32)
+
+
+-install (
+- TARGETS flann_cpp flann_cpp_s
+- RUNTIME DESTINATION bin
+- LIBRARY DESTINATION ${FLANN_LIB_INSTALL_DIR}
+- ARCHIVE DESTINATION ${FLANN_LIB_INSTALL_DIR}
+-)
++#install (
++# TARGETS flann_cpp flann_cpp_s
++# RUNTIME DESTINATION bin
++# LIBRARY DESTINATION ${FLANN_LIB_INSTALL_DIR}
++# ARCHIVE DESTINATION ${FLANN_LIB_INSTALL_DIR}
++#)
+
+ if (BUILD_CUDA_LIB)
+ install (
+@@ -129,7 +129,7 @@ endif()
+
+ if (BUILD_C_BINDINGS)
+ install (
+- TARGETS flann flann_s
++ TARGETS flann
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION ${FLANN_LIB_INSTALL_DIR}
+ ARCHIVE DESTINATION ${FLANN_LIB_INSTALL_DIR}
diff --git a/ports/flann/portfile.cmake b/ports/flann/portfile.cmake
new file mode 100644
index 000000000..4a87365c0
--- /dev/null
+++ b/ports/flann/portfile.cmake
@@ -0,0 +1,51 @@
+# Common Ambient Variables:
+# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
+# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
+# CURRENT_PORT DIR = ${VCPKG_ROOT_DIR}\ports\${PORT}
+# PORT = current port name (zlib, etc)
+# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc)
+# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic)
+# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic)
+# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
+# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm)
+#
+
+include(vcpkg_common_functions)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO mariusmuja/flann
+ REF 1.9.1
+ SHA512 0da78bb14111013318160dd3dee1f93eb6ed077b18439fd6496017b62a8a6070cc859cfb3e08dad4c614e48d9dc1da5f7c4a21726ee45896d360506da074a6f7
+)
+
+vcpkg_apply_patches(
+ SOURCE_PATH ${SOURCE_PATH}
+ PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-install-flann.patch"
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ #PREFER_NINJA # Disable this option if project cannot be built with Ninja
+ OPTIONS
+ -DBUILD_EXAMPLES=OFF
+ -DBUILD_PYTHON_BINDINGS=OFF
+ -DBUILD_MATLAB_BINDINGS=OFF
+ -DBUILD_DOC=OFF
+
+ OPTIONS_RELEASE
+ -DFLANN_LIB_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/lib
+
+ OPTIONS_DEBUG
+ -DFLANN_LIB_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/debug/lib
+
+)
+
+vcpkg_install_cmake()
+
+#clean
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
+# Handle copyright
+file(COPY ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/flann)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/flann/README.md ${CURRENT_PACKAGES_DIR}/share/flann/copyright) \ No newline at end of file
diff --git a/ports/qhull/CONTROL b/ports/qhull/CONTROL
new file mode 100644
index 000000000..aaf569f25
--- /dev/null
+++ b/ports/qhull/CONTROL
@@ -0,0 +1,3 @@
+Source: qhull
+Version:1.0
+Description: computes the convex hull, Delaunay triangulation, Voronoi diagram
diff --git a/ports/qhull/portfile.cmake b/ports/qhull/portfile.cmake
new file mode 100644
index 000000000..77c585b40
--- /dev/null
+++ b/ports/qhull/portfile.cmake
@@ -0,0 +1,46 @@
+# Common Ambient Variables:
+# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
+# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
+# CURRENT_PORT DIR = ${VCPKG_ROOT_DIR}\ports\${PORT}
+# PORT = current port name (zlib, etc)
+# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc)
+# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic)
+# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic)
+# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
+# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm)
+#
+
+include(vcpkg_common_functions)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO qhull/qhull
+ REF master
+ SHA512 16aa9f93ce6fe8342a3b579881f10bb417679b0a70849e6b0cc5a89551e4de773a43bb0d54948196690d68d168f3a2a215e4600745ff1566302b0b426565fb25
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ #PREFER_NINJA # Disable this option if project cannot be built with Ninja
+ 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
+ -Dqhull_TARGETS_INSTALL=qhullcpp
+ -DLIB_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/lib
+
+ OPTIONS_DEBUG
+ -Dqhull_TARGETS_INSTALL=qhullcpp_d
+ -DLIB_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/debug/lib
+)
+
+vcpkg_install_cmake()
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+file(GLOB_RECURSE HTMFILES ${CURRENT_PACKAGES_DIR}/include/*.htm)
+file(REMOVE ${HTMFILES})
+
+# Handle copyright
+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)