vcpkg/ports/halide/portfile.cmake
Yury Bura 63d9dcdd7e
[llvm] Update to 18.1.6 (#37599)
Fixes #37189
- [x] Changes comply with the [maintainer
guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md).
- [x] SHA512s are updated for each updated download.
- [x] The "supports" clause reflects platforms that may be fixed by this
new version.
- [x] Any fixed [CI
baseline](https://github.com/microsoft/vcpkg/blob/master/scripts/ci.baseline.txt)
entries are removed from that file.
- [x] Any patches that are no longer applied are deleted from the port's
directory.
- [x] The version database is fixed by rerunning `./vcpkg x-add-version
--all` and committing the result.
- [x] Only one version is added to each modified port's versions file.
2024-06-06 01:14:30 -07:00

69 lines
2.3 KiB
CMake

vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO halide/Halide
REF 8864e8ac1c0bb460f0034e9c46f7f944afad3a19 # unreleased version with LLVM 18 support
SHA512 286cbef25b5cc0f5095cbc80a2fd1cacf369948c58c14406ac6bcc28a7a37c81417d601975083f03670e22276a1886b8801bdc91aa6fe80049a276a1c8fd08b9
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)