[halide] Fix several issues with the Halide port after v12 (#18747)

* Fix several issues with the Halide port after v12

1. Use vcpkg-cmake and vcpkg-cmake-config ports
2. Fix usage file to point to relevant documentation
3. Remove OpenGL feature (Halide 12 dropped support)
4. Drop VCPKG_POLICY_EMPTY_PACKAGE
5. Set new Halide packaging variables for better vcpkg compliance.

* update versions
This commit is contained in:
Alex Reinking 2021-07-01 07:24:48 -07:00 committed by GitHub
parent ab3a2b5e09
commit 72ee11d37a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 32 additions and 18 deletions

View File

@ -1,10 +1,5 @@
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
# Halide distributes some loadable modules that belong in lib on all platforms.
# CMake defaults module DLLs into the lib folder, which is incompatible with
# vcpkgs current policy. This sidesteps that issue, a bit bluntly.
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO halide/Halide
@ -25,15 +20,13 @@ vcpkg_check_features(
target-mips TARGET_MIPS
target-nvptx TARGET_NVPTX
target-opencl TARGET_OPENCL
target-opengl TARGET_OPENGL
target-powerpc TARGET_POWERPC
target-riscv TARGET_RISCV
target-x86 TARGET_X86
)
vcpkg_configure_cmake(
vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS ${FEATURE_OPTIONS}
-DWITH_DOCS=NO
-DWITH_PYTHON_BINDINGS=NO
@ -42,10 +35,14 @@ vcpkg_configure_cmake(
-DWITH_UTILS=NO
-DCMAKE_INSTALL_LIBDIR=bin
-DCMAKE_INSTALL_DATADIR=share/${PORT}
-DHALIDE_INSTALL_CMAKEDIR=share/${PORT}
-DHalide_INSTALL_CMAKEDIR=share/${PORT}
-DHalide_INSTALL_HELPERSDIR=share/HalideHelpers
-DHalide_INSTALL_PLUGINDIR=bin
)
vcpkg_install_cmake(ADD_BIN_TO_PATH)
# ADD_BIN_TO_PATH needed to compile autoschedulers,
# which use Halide.dll (and deps) during the build.
vcpkg_cmake_install(ADD_BIN_TO_PATH)
vcpkg_copy_tools(
TOOL_NAMES
@ -56,9 +53,16 @@ vcpkg_copy_tools(
AUTO_CLEAN
)
vcpkg_copy_pdbs()
# 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_fixup_cmake_targets()
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)

View File

@ -11,4 +11,4 @@ The package halide provides CMake targets:
target_link_libraries(main PRIVATE filter)
For more information see:
https://github.com/halide/Halide/blob/v11.0.1/README_cmake.md
https://github.com/halide/Halide/blob/v12.0.1/README_cmake.md

View File

@ -1,6 +1,7 @@
{
"name": "halide",
"version": "12.0.1",
"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",
"supports": "!uwp",
@ -12,6 +13,14 @@
"enable-rtti",
"tools"
]
},
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
],
"default-features": [
@ -82,7 +91,6 @@
"target-mips",
"target-nvptx",
"target-opencl",
"target-opengl",
"target-powerpc",
"target-riscv",
"target-x86"
@ -159,9 +167,6 @@
"target-opencl": {
"description": "Include OpenCL-C target"
},
"target-opengl": {
"description": "Include OpenGL/GLSL target"
},
"target-powerpc": {
"description": "Include PowerPC target",
"dependencies": [

View File

@ -2458,7 +2458,7 @@
},
"halide": {
"baseline": "12.0.1",
"port-version": 0
"port-version": 1
},
"happly": {
"baseline": "2021-03-19",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "512cb4dd40ca40afbf0c6a35f7bdc595589a0b10",
"version": "12.0.1",
"port-version": 1
},
{
"git-tree": "50e2c4835a57bb4a172c4b82b2a0e0a3077088ab",
"version": "12.0.1",