aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/mlpack
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/mlpack')
-rw-r--r--vcpkg/ports/mlpack/portfile.cmake19
-rw-r--r--vcpkg/ports/mlpack/usage4
-rw-r--r--vcpkg/ports/mlpack/vcpkg.json14
3 files changed, 37 insertions, 0 deletions
diff --git a/vcpkg/ports/mlpack/portfile.cmake b/vcpkg/ports/mlpack/portfile.cmake
new file mode 100644
index 0000000..66e09aa
--- /dev/null
+++ b/vcpkg/ports/mlpack/portfile.cmake
@@ -0,0 +1,19 @@
+# header-only library
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO mlpack/mlpack
+ REF "${VERSION}"
+ SHA512 20db99f792d7c12caa6ba149538363f05e713fc4ef25cfdad5807223b8379ae7529e2a2f31cbe79fcd45a9bd6bb12d6ef91ffc5d5f144768153aca6eeed8184e
+ HEAD_REF master
+)
+
+# Copy the header files
+file(GLOB HEADERS_SRC "${SOURCE_PATH}/src/*.hpp")
+file(GLOB HEADERS_MLPACK "${SOURCE_PATH}/src/mlpack/*.hpp")
+file(COPY ${HEADERS_SRC} DESTINATION "${CURRENT_PACKAGES_DIR}/include")
+file(COPY ${HEADERS_MLPACK} DESTINATION "${CURRENT_PACKAGES_DIR}/include/mlpack")
+file(COPY "${SOURCE_PATH}/src/mlpack/methods/" DESTINATION "${CURRENT_PACKAGES_DIR}/include/mlpack/methods")
+file(COPY "${SOURCE_PATH}/src/mlpack/core/" DESTINATION "${CURRENT_PACKAGES_DIR}/include/mlpack/core")
+
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYRIGHT.txt")
+configure_file("${CMAKE_CURRENT_LIST_DIR}/usage" "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" @ONLY)
diff --git a/vcpkg/ports/mlpack/usage b/vcpkg/ports/mlpack/usage
new file mode 100644
index 0000000..2c44d41
--- /dev/null
+++ b/vcpkg/ports/mlpack/usage
@@ -0,0 +1,4 @@
+The package mlpack is header only and can be used from CMake via:
+
+ find_path(MLPACK_INCLUDE_DIRS "mlpack.hpp")
+ target_include_directories(main PRIVATE ${MLPACK_INCLUDE_DIRS})
diff --git a/vcpkg/ports/mlpack/vcpkg.json b/vcpkg/ports/mlpack/vcpkg.json
new file mode 100644
index 0000000..16567e6
--- /dev/null
+++ b/vcpkg/ports/mlpack/vcpkg.json
@@ -0,0 +1,14 @@
+{
+ "name": "mlpack",
+ "version": "4.6.2",
+ "description": "mlpack is an intuitive, fast, and flexible header-only C++ machine learning library with bindings to other languages.",
+ "homepage": "https://github.com/mlpack/mlpack",
+ "license": "BSD-3-Clause",
+ "supports": "!uwp",
+ "dependencies": [
+ "armadillo",
+ "cereal",
+ "ensmallen",
+ "stb"
+ ]
+}