2020-10-14 08:54:46 +08:00
|
|
|
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
|
|
|
|
|
2021-12-21 00:21:15 +08:00
|
|
|
set(HALIDE_VERSION_TAG v13.0.2)
|
|
|
|
|
2019-09-27 17:05:33 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO halide/Halide
|
2021-12-21 00:21:15 +08:00
|
|
|
REF ${HALIDE_VERSION_TAG}
|
|
|
|
SHA512 d2b19934ff0d759d302428f61e4075306f79c29cc1cd8802dc1ac5f325434034e0f430c435610e58f862b87cc8ef34ddcc3d0588947eeb8e1387d0bf31b9c008
|
|
|
|
HEAD_REF release/13.x
|
2017-11-22 12:27:19 +08:00
|
|
|
)
|
2017-11-22 13:45:26 +08:00
|
|
|
|
2021-06-30 07:08:28 +08:00
|
|
|
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-hexagon TARGET_HEXAGON
|
|
|
|
target-metal TARGET_METAL
|
|
|
|
target-mips TARGET_MIPS
|
|
|
|
target-nvptx TARGET_NVPTX
|
|
|
|
target-opencl TARGET_OPENCL
|
|
|
|
target-powerpc TARGET_POWERPC
|
|
|
|
target-riscv TARGET_RISCV
|
|
|
|
target-x86 TARGET_X86
|
2017-11-22 12:27:19 +08:00
|
|
|
)
|
|
|
|
|
2021-07-01 22:24:48 +08:00
|
|
|
vcpkg_cmake_configure(
|
2019-09-27 17:05:33 +08:00
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
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}
|
2021-07-01 22:24:48 +08:00
|
|
|
-DHalide_INSTALL_CMAKEDIR=share/${PORT}
|
|
|
|
-DHalide_INSTALL_HELPERSDIR=share/HalideHelpers
|
|
|
|
-DHalide_INSTALL_PLUGINDIR=bin
|
2017-11-22 12:27:19 +08:00
|
|
|
)
|
|
|
|
|
2021-07-01 22:24:48 +08:00
|
|
|
# ADD_BIN_TO_PATH needed to compile autoschedulers,
|
|
|
|
# which use Halide.dll (and deps) during the build.
|
|
|
|
vcpkg_cmake_install(ADD_BIN_TO_PATH)
|
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
|
|
|
|
2021-07-01 22:24:48 +08:00
|
|
|
# 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"
|
|
|
|
)
|
2017-11-22 12:27:19 +08:00
|
|
|
|
2021-07-01 22:24:48 +08:00
|
|
|
vcpkg_cmake_config_fixup()
|
|
|
|
vcpkg_cmake_config_fixup(PACKAGE_NAME HalideHelpers)
|
2020-10-14 08:54:46 +08:00
|
|
|
|
|
|
|
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)
|
|
|
|
|
|
|
|
configure_file(${SOURCE_PATH}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)
|
2021-12-21 00:21:15 +08:00
|
|
|
configure_file(${CMAKE_CURRENT_LIST_DIR}/usage.in ${CURRENT_PACKAGES_DIR}/share/${PORT}/usage @ONLY)
|