2020-10-14 08:54:46 +08:00
|
|
|
|
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
|
|
|
|
|
# vcpkg’s current policy. This sidesteps that issue, a bit bluntly.
|
|
|
|
|
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
|
|
|
|
|
|
2019-09-27 17:05:33 +08:00
|
|
|
|
vcpkg_from_github(
|
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
|
REPO halide/Halide
|
2021-02-20 05:01:11 +08:00
|
|
|
|
REF 85c1b91c47ce15aab0d9502d955e48615f3bcee0 # v11.0.1
|
|
|
|
|
SHA512 3bfdf9fc82d56d099cf74b6683c0017724c1c4ae791e824f5ef3b4d4c1dcb52dd5adddb740ccf6b073b71fcbb748238f42040071ddb64c155f8fdc2709b8121d
|
|
|
|
|
HEAD_REF release/11.x
|
2017-11-22 12:27:19 +08:00
|
|
|
|
)
|
2017-11-22 13:45:26 +08:00
|
|
|
|
|
2019-09-27 17:05:33 +08:00
|
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
2020-10-14 08:54:46 +08:00
|
|
|
|
target-aarch64 TARGET_AARCH64
|
|
|
|
|
target-amdgpu TARGET_AMDGPU
|
|
|
|
|
target-arm TARGET_ARM
|
|
|
|
|
target-d3d12compute TARGET_D3D12COMPUTE
|
|
|
|
|
target-hexagon TARGET_HEXAGON
|
|
|
|
|
target-metal TARGET_METAL
|
|
|
|
|
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
|
2017-11-22 12:27:19 +08:00
|
|
|
|
)
|
|
|
|
|
|
2019-09-27 17:05:33 +08:00
|
|
|
|
vcpkg_configure_cmake(
|
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
|
PREFER_NINJA
|
|
|
|
|
OPTIONS ${FEATURE_OPTIONS}
|
2020-10-14 08:54:46 +08:00
|
|
|
|
-DWITH_DOCS=NO
|
|
|
|
|
-DWITH_PYTHON_BINDINGS=NO
|
|
|
|
|
-DWITH_TESTS=NO
|
|
|
|
|
-DWITH_TUTORIALS=NO
|
|
|
|
|
-DWITH_UTILS=NO
|
|
|
|
|
-DCMAKE_INSTALL_LIBDIR=bin
|
|
|
|
|
-DCMAKE_INSTALL_DATADIR=share/${PORT}
|
|
|
|
|
-DHALIDE_INSTALL_CMAKEDIR=share/${PORT}
|
2017-11-22 12:27:19 +08:00
|
|
|
|
)
|
|
|
|
|
|
2019-09-27 17:05:33 +08:00
|
|
|
|
vcpkg_install_cmake()
|
2017-11-22 12:27:19 +08:00
|
|
|
|
|
2020-10-14 08:54:46 +08:00
|
|
|
|
vcpkg_copy_tools(
|
|
|
|
|
TOOL_NAMES
|
|
|
|
|
featurization_to_sample
|
|
|
|
|
get_host_target
|
|
|
|
|
retrain_cost_model
|
|
|
|
|
weightsdir_to_weightsfile
|
|
|
|
|
AUTO_CLEAN
|
|
|
|
|
)
|
2017-11-22 12:27:19 +08:00
|
|
|
|
|
2019-09-27 17:05:33 +08:00
|
|
|
|
vcpkg_copy_pdbs()
|
2017-11-22 12:27:19 +08:00
|
|
|
|
|
2020-10-14 08:54:46 +08:00
|
|
|
|
vcpkg_fixup_cmake_targets()
|
|
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/tutorial)
|
|
|
|
|
|
|
|
|
|
file(GLOB readmes "${CURRENT_PACKAGES_DIR}/share/${PORT}/*.md")
|
|
|
|
|
file(REMOVE ${readmes})
|
2017-11-22 12:27:19 +08:00
|
|
|
|
|
2020-10-14 08:54:46 +08:00
|
|
|
|
configure_file(${SOURCE_PATH}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)
|
|
|
|
|
configure_file(${CMAKE_CURRENT_LIST_DIR}/usage ${CURRENT_PACKAGES_DIR}/share/${PORT}/usage COPYONLY)
|