aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/halide
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/halide
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/halide')
-rw-r--r--vcpkg/ports/halide/portfile.cmake68
-rw-r--r--vcpkg/ports/halide/usage.in27
-rw-r--r--vcpkg/ports/halide/vcpkg.json205
3 files changed, 300 insertions, 0 deletions
diff --git a/vcpkg/ports/halide/portfile.cmake b/vcpkg/ports/halide/portfile.cmake
new file mode 100644
index 0000000..ff652f2
--- /dev/null
+++ b/vcpkg/ports/halide/portfile.cmake
@@ -0,0 +1,68 @@
+vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO halide/Halide
+ REF "v${VERSION}"
+ SHA512 ab684be4cb8bad7b46b8df5271efb37d3675344f689e37b7af1f12f584fba23318ed8f934156a8b99802b86bdebb55fac9cbcca193d58951ae0ace4816e4ec46
+ HEAD_REF main
+)
+
+vcpkg_check_features(
+ OUT_FEATURE_OPTIONS FEATURE_OPTIONS
+ FEATURES
+ target-aarch64 TARGET_AARCH64
+ target-amdgpu TARGET_AMDGPU
+ target-arm TARGET_ARM
+ target-d3d12compute TARGET_D3D12COMPUTE
+ target-opengl-compute TARGET_OPENGLCOMPUTE
+ target-hexagon TARGET_HEXAGON
+ target-metal TARGET_METAL
+ target-nvptx TARGET_NVPTX
+ target-opencl TARGET_OPENCL
+ target-powerpc TARGET_POWERPC
+ target-riscv TARGET_RISCV
+ target-webassembly TARGET_WEBASSEMBLY
+ target-x86 TARGET_X86
+)
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS ${FEATURE_OPTIONS}
+ -DWITH_WABT=OFF
+ -DWITH_V8=OFF
+ -DWITH_DOCS=OFF
+ -DWITH_PYTHON_BINDINGS=OFF
+ -DWITH_TESTS=OFF
+ -DWITH_TUTORIALS=OFF
+ -DWITH_UTILS=OFF
+ -DWITH_SERIALIZATION=OFF # Disable experimental serializer
+ -DCMAKE_INSTALL_LIBDIR=bin
+ "-DCMAKE_INSTALL_DATADIR=share/${PORT}"
+ "-DHalide_INSTALL_CMAKEDIR=share/${PORT}"
+ -DHalide_INSTALL_HELPERSDIR=share/HalideHelpers
+ -DHalide_INSTALL_PLUGINDIR=bin
+ -DCMAKE_DISABLE_FIND_PACKAGE_PNG=TRUE
+ -DCMAKE_DISABLE_FIND_PACKAGE_JPEG=JPEG
+)
+
+# ADD_BIN_TO_PATH needed to compile autoschedulers,
+# which use Halide.dll (and deps) during the build.
+vcpkg_cmake_install(ADD_BIN_TO_PATH)
+
+# Release mode MODULE targets in CMake don't get PDBs.
+# Exclude those to avoid warning with default globs.
+vcpkg_copy_pdbs(
+ BUILD_PATHS
+ "${CURRENT_PACKAGES_DIR}/bin/Halide.dll"
+ "${CURRENT_PACKAGES_DIR}/debug/bin/*.dll"
+)
+
+vcpkg_cmake_config_fixup()
+vcpkg_cmake_config_fixup(PACKAGE_NAME HalideHelpers)
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
+
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")
+configure_file("${CMAKE_CURRENT_LIST_DIR}/usage.in" "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" @ONLY)
diff --git a/vcpkg/ports/halide/usage.in b/vcpkg/ports/halide/usage.in
new file mode 100644
index 0000000..70cb98b
--- /dev/null
+++ b/vcpkg/ports/halide/usage.in
@@ -0,0 +1,27 @@
+The package halide provides CMake targets:
+
+ set(CMAKE_CXX_STANDARD 17)
+ set(CMAKE_CXX_STANDARD_REQUIRED YES)
+ set(CMAKE_CXX_EXTENSIONS NO)
+
+ find_package(Halide REQUIRED)
+
+ # JIT mode:
+ add_executable(my_halide_app main.cpp)
+ target_link_libraries(my_halide_app PRIVATE Halide::Halide)
+
+ # AOT mode:
+ add_executable(my_generators my_generators.cpp)
+ target_link_libraries(my_generators PRIVATE Halide::Generator)
+ add_halide_library(my_first_generator FROM my_generators)
+ add_halide_library(my_second_generator FROM my_generators
+ PARAMS parallel=false scale=3.0 rotation=ccw output.type=uint16)
+ add_halide_library(my_second_generator_2 FROM my_generators
+ GENERATOR my_second_generator
+ PARAMS scale=9.0 rotation=ccw output.type=float32)
+ add_halide_library(my_second_generator_3 FROM my_generators
+ GENERATOR my_second_generator
+ PARAMS parallel=false output.type=float64)
+
+For more information see:
+ https://github.com/halide/Halide/blob/@HALIDE_VERSION_TAG@/README_cmake.md
diff --git a/vcpkg/ports/halide/vcpkg.json b/vcpkg/ports/halide/vcpkg.json
new file mode 100644
index 0000000..9c9a334
--- /dev/null
+++ b/vcpkg/ports/halide/vcpkg.json
@@ -0,0 +1,205 @@
+{
+ "name": "halide",
+ "version": "18.0.0",
+ "port-version": 1,
+ "description": "Halide is a programming language designed to make it easier to write high-performance image and array processing code on modern machines.",
+ "homepage": "https://github.com/halide/Halide",
+ "license": "MIT",
+ "supports": "!uwp",
+ "dependencies": [
+ {
+ "name": "halide",
+ "default-features": false,
+ "features": [
+ "target-arm"
+ ],
+ "platform": "arm32"
+ },
+ {
+ "name": "halide",
+ "default-features": false,
+ "features": [
+ "target-aarch64"
+ ],
+ "platform": "arm64"
+ },
+ {
+ "name": "halide",
+ "default-features": false,
+ "features": [
+ "target-x86"
+ ],
+ "platform": "x86 | x64"
+ },
+ {
+ "name": "halide",
+ "features": [
+ "target-all"
+ ],
+ "platform": "!x86 & !x64 & !arm"
+ },
+ {
+ "name": "llvm",
+ "default-features": false,
+ "features": [
+ "clang",
+ "enable-rtti",
+ "tools"
+ ]
+ },
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ],
+ "features": {
+ "target-aarch64": {
+ "description": "Include AArch64 target",
+ "dependencies": [
+ {
+ "name": "llvm",
+ "default-features": false,
+ "features": [
+ "target-aarch64"
+ ]
+ }
+ ]
+ },
+ "target-all": {
+ "description": "Include all targets",
+ "dependencies": [
+ {
+ "name": "halide",
+ "default-features": false,
+ "features": [
+ "target-aarch64",
+ "target-amdgpu",
+ "target-arm",
+ "target-d3d12compute",
+ "target-hexagon",
+ "target-metal",
+ "target-nvptx",
+ "target-opencl",
+ "target-opengl-compute",
+ "target-powerpc",
+ "target-riscv",
+ "target-webassembly",
+ "target-x86"
+ ]
+ }
+ ]
+ },
+ "target-amdgpu": {
+ "description": "Include AMDGPU target",
+ "dependencies": [
+ {
+ "name": "llvm",
+ "default-features": false,
+ "features": [
+ "target-amdgpu"
+ ]
+ }
+ ]
+ },
+ "target-arm": {
+ "description": "Include ARM target",
+ "dependencies": [
+ {
+ "name": "llvm",
+ "default-features": false,
+ "features": [
+ "target-arm"
+ ]
+ }
+ ]
+ },
+ "target-d3d12compute": {
+ "description": "Include Direct3D 12 Compute target"
+ },
+ "target-hexagon": {
+ "description": "Include Hexagon target",
+ "dependencies": [
+ {
+ "name": "llvm",
+ "default-features": false,
+ "features": [
+ "target-hexagon"
+ ]
+ }
+ ]
+ },
+ "target-metal": {
+ "description": "Include Metal target"
+ },
+ "target-nvptx": {
+ "description": "Include NVPTX target",
+ "dependencies": [
+ {
+ "name": "llvm",
+ "default-features": false,
+ "features": [
+ "target-nvptx"
+ ]
+ }
+ ]
+ },
+ "target-opencl": {
+ "description": "Include OpenCL-C target"
+ },
+ "target-opengl-compute": {
+ "description": "Include OpenGL Compute target"
+ },
+ "target-powerpc": {
+ "description": "Include PowerPC target",
+ "dependencies": [
+ {
+ "name": "llvm",
+ "default-features": false,
+ "features": [
+ "target-powerpc"
+ ]
+ }
+ ]
+ },
+ "target-riscv": {
+ "description": "Include RISCV target",
+ "dependencies": [
+ {
+ "name": "llvm",
+ "default-features": false,
+ "features": [
+ "target-riscv"
+ ]
+ }
+ ]
+ },
+ "target-webassembly": {
+ "description": "Include WebAssembly target",
+ "dependencies": [
+ {
+ "name": "llvm",
+ "default-features": false,
+ "features": [
+ "target-webassembly"
+ ]
+ }
+ ]
+ },
+ "target-x86": {
+ "description": "Include X86 target",
+ "dependencies": [
+ {
+ "name": "llvm",
+ "default-features": false,
+ "features": [
+ "target-x86"
+ ]
+ }
+ ]
+ }
+ }
+}