2020-10-14 08:54:46 +08:00
|
|
|
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
|
|
|
|
|
2019-09-27 17:05:33 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO halide/Halide
|
2024-02-23 02:22:04 +08:00
|
|
|
REF "v${VERSION}"
|
|
|
|
SHA512 fd94b35d0af2bbb4e932c6be5204c8a4bf011a9c62bcfc2115d263b269438bb5858627492c108c17140ccf872317f072619b59b6f583fed1bec001af53b8c0e2
|
2023-07-26 02:08:13 +08:00
|
|
|
HEAD_REF main
|
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
|
2023-04-10 12:56:02 +08:00
|
|
|
target-opengl-compute TARGET_OPENGLCOMPUTE
|
2021-06-30 07:08:28 +08:00
|
|
|
target-hexagon TARGET_HEXAGON
|
|
|
|
target-metal TARGET_METAL
|
|
|
|
target-nvptx TARGET_NVPTX
|
|
|
|
target-opencl TARGET_OPENCL
|
|
|
|
target-powerpc TARGET_POWERPC
|
|
|
|
target-riscv TARGET_RISCV
|
2023-10-13 01:46:42 +08:00
|
|
|
target-webassembly TARGET_WEBASSEMBLY
|
2021-06-30 07:08:28 +08:00
|
|
|
target-x86 TARGET_X86
|
2017-11-22 12:27:19 +08:00
|
|
|
)
|
|
|
|
|
2021-07-01 22:24:48 +08:00
|
|
|
vcpkg_cmake_configure(
|
2022-09-29 02:26:31 +08:00
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2019-09-27 17:05:33 +08:00
|
|
|
OPTIONS ${FEATURE_OPTIONS}
|
2022-09-29 02:26:31 +08:00
|
|
|
-DWITH_WABT=OFF
|
|
|
|
-DWITH_V8=OFF
|
|
|
|
-DWITH_DOCS=OFF
|
|
|
|
-DWITH_PYTHON_BINDINGS=OFF
|
|
|
|
-DWITH_TESTS=OFF
|
|
|
|
-DWITH_TUTORIALS=OFF
|
|
|
|
-DWITH_UTILS=OFF
|
2023-10-13 01:46:42 +08:00
|
|
|
-DWITH_SERIALIZATION=OFF # Disable experimental serializer
|
2020-10-14 08:54:46 +08:00
|
|
|
-DCMAKE_INSTALL_LIBDIR=bin
|
2022-09-29 02:26:31 +08:00
|
|
|
"-DCMAKE_INSTALL_DATADIR=share/${PORT}"
|
|
|
|
"-DHalide_INSTALL_CMAKEDIR=share/${PORT}"
|
2021-07-01 22:24:48 +08:00
|
|
|
-DHalide_INSTALL_HELPERSDIR=share/HalideHelpers
|
|
|
|
-DHalide_INSTALL_PLUGINDIR=bin
|
2023-03-31 04:28:16 +08:00
|
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_PNG=TRUE
|
|
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_JPEG=JPEG
|
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
|
|
|
|
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
|
|
|
|
2022-09-29 02:26:31 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
2020-10-14 08:54:46 +08:00
|
|
|
|
2023-07-26 02:08:13 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")
|
2022-09-29 02:26:31 +08:00
|
|
|
configure_file("${CMAKE_CURRENT_LIST_DIR}/usage.in" "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" @ONLY)
|