aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/flashlight-text
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/flashlight-text')
-rw-r--r--vcpkg/ports/flashlight-text/portfile.cmake33
-rw-r--r--vcpkg/ports/flashlight-text/vcpkg.json25
2 files changed, 58 insertions, 0 deletions
diff --git a/vcpkg/ports/flashlight-text/portfile.cmake b/vcpkg/ports/flashlight-text/portfile.cmake
new file mode 100644
index 0000000..2b6a5ef
--- /dev/null
+++ b/vcpkg/ports/flashlight-text/portfile.cmake
@@ -0,0 +1,33 @@
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO flashlight/text
+ REF v${VERSION}
+ SHA512 d9ed9b687c441e356b19a035ecef1abc76d90e3e0d8a9c32899bd7a81e379a9ae51bc6d68e7bae10cf83b87ec76289afbd81909d70799ca8d24f996e8667ad85
+ HEAD_REF main
+)
+
+vcpkg_check_features(
+ OUT_FEATURE_OPTIONS FEATURE_OPTIONS
+ FEATURES
+ kenlm FL_TEXT_USE_KENLM
+)
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ -DFL_TEXT_BUILD_TESTS=OFF
+ -DFL_TEXT_BUILD_STANDALONE=OFF
+ ${FEATURE_OPTIONS}
+ OPTIONS_DEBUG
+ "-DFL_INSTALL_CMAKE_DIR=${CURRENT_PACKAGES_DIR}/debug/share/${PORT}"
+ OPTIONS_RELEASE
+ "-DFL_INSTALL_CMAKE_DIR=${CURRENT_PACKAGES_DIR}/share/${PORT}"
+
+)
+vcpkg_cmake_install()
+vcpkg_cmake_config_fixup()
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
+
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
diff --git a/vcpkg/ports/flashlight-text/vcpkg.json b/vcpkg/ports/flashlight-text/vcpkg.json
new file mode 100644
index 0000000..39fdad2
--- /dev/null
+++ b/vcpkg/ports/flashlight-text/vcpkg.json
@@ -0,0 +1,25 @@
+{
+ "name": "flashlight-text",
+ "version": "0.0.4",
+ "description": "Flashlight Text is a library for tokenization, beam search, and text processing.",
+ "homepage": "https://github.com/flashlight/text",
+ "license": "MIT",
+ "dependencies": [
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ],
+ "features": {
+ "kenlm": {
+ "description": "Build with KenLM",
+ "dependencies": [
+ "kenlm"
+ ]
+ }
+ }
+}