2019-09-27 17:05:33 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO halide/Halide
|
2020-05-04 11:30:17 +08:00
|
|
|
REF f43293be3725bb959941e38c1b1fa9ae925f7389
|
|
|
|
SHA512 f223185e208acf6c5b73353a6b5be815db5f2598f568596e800c35ea40b0babe4630da44229e14a5607e9d5e78298d07e7b36a9cbc7b71bf3e665bc12caff68e
|
2019-09-27 17:05:33 +08:00
|
|
|
HEAD_REF master
|
|
|
|
PATCHES
|
|
|
|
fix-install-path.patch
|
2017-11-22 12:27:19 +08:00
|
|
|
)
|
2017-11-22 13:45:26 +08:00
|
|
|
|
2019-09-27 17:05:33 +08:00
|
|
|
set(TARGET_X86 OFF)
|
|
|
|
set(TARGET_ARM OFF)
|
|
|
|
set(TARGET_AARCH64 OFF)
|
|
|
|
if (VCPKG_TARGET_ARCHITECTURE STREQUAL x86 OR VCPKG_TARGET_ARCHITECTURE STREQUAL x64)
|
|
|
|
# llvm x86 components are required for llvm x64
|
|
|
|
set(TARGET_X86 ON)
|
|
|
|
elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL arm)
|
|
|
|
set(TARGET_X86 OFF)
|
|
|
|
if (TARGET_TRIPLET STREQUAL arm64)
|
|
|
|
set(TARGET_AARCH64 ON)
|
|
|
|
else()
|
|
|
|
set(TARGET_ARM ON)
|
|
|
|
endif()
|
|
|
|
endif()
|
2017-11-22 13:45:26 +08:00
|
|
|
|
2019-09-27 17:05:33 +08:00
|
|
|
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
|
|
|
set(HALIDE_SHARED_LIBRARY ON)
|
|
|
|
else()
|
|
|
|
set(HALIDE_SHARED_LIBRARY OFF)
|
|
|
|
endif()
|
2017-11-22 12:27:19 +08:00
|
|
|
|
2019-09-27 17:05:33 +08:00
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
app WITH_APPS
|
|
|
|
test WITH_TESTS
|
|
|
|
tutorials WITH_TUTORIALS
|
|
|
|
docs WITH_DOCS
|
|
|
|
utils WITH_UTILS
|
|
|
|
nativeclient TARGET_NATIVE_CLIENT
|
|
|
|
hexagon TARGET_HEXAGON
|
|
|
|
metal TARGET_METAL
|
|
|
|
mips TARGET_MIPS
|
|
|
|
powerpc TARGET_POWERPC
|
|
|
|
ptx TARGET_PTX
|
|
|
|
opencl TARGET_OPENCL
|
|
|
|
opengl TARGET_OPENGL
|
|
|
|
opengl TARGET_OPENGLCOMPUTE
|
|
|
|
rtti HALIDE_ENABLE_RTTI
|
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}
|
|
|
|
-DTRIPLET_SYSTEM_ARCH=${TRIPLET_SYSTEM_ARCH}
|
|
|
|
-DHALIDE_SHARED_LIBRARY=${HALIDE_SHARED_LIBRARY}
|
|
|
|
-DTARGET_X86=${TARGET_X86}
|
|
|
|
-DTARGET_ARM=${TARGET_ARM}
|
|
|
|
-DTARGET_AARCH64=${TARGET_AARCH64}
|
|
|
|
#-DTARGET_AMDGPU
|
|
|
|
-DWARNINGS_AS_ERRORS=OFF
|
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
|
|
|
|
2019-09-27 17:05:33 +08:00
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH share/halide)
|
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
|
|
|
|
2019-09-27 17:05:33 +08:00
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share)
|
2020-02-05 05:32:09 +08:00
|
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/halide_config.cmake ${CURRENT_PACKAGES_DIR}/share/${PORT}/halide-config.cmake)
|
|
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/halide_config.make ${CURRENT_PACKAGES_DIR}/share/${PORT}/halide-config.make)
|
2017-11-22 12:27:19 +08:00
|
|
|
|
2019-09-27 17:05:33 +08:00
|
|
|
file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|