2020-12-17 16:12:26 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO oneapi-src/oneDNN
|
2023-06-24 04:29:52 +08:00
|
|
|
REF v3.1.1
|
|
|
|
SHA512 0dae0ccff1e459ce24356694732bf4ee3c459469de70984863e1aed3bc965471793a110dedbb11f2baa762749cea7652a150d2f9a442c299d9ffa00febd87fec
|
2020-12-17 16:12:26 +08:00
|
|
|
HEAD_REF master
|
|
|
|
)
|
|
|
|
|
|
|
|
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
2021-11-16 08:33:05 +08:00
|
|
|
set(DNNL_OPTIONS "-DDNNL_LIBRARY_TYPE=STATIC")
|
2020-12-17 16:12:26 +08:00
|
|
|
endif()
|
|
|
|
|
2021-09-29 23:36:49 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2020-12-17 16:12:26 +08:00
|
|
|
OPTIONS ${DNNL_OPTIONS}
|
|
|
|
)
|
2021-09-29 23:36:49 +08:00
|
|
|
vcpkg_cmake_install()
|
2020-12-17 16:12:26 +08:00
|
|
|
|
2020-12-31 14:38:55 +08:00
|
|
|
# The port name and the find_package() name are different (onednn versus dnnl)
|
2021-09-29 23:36:49 +08:00
|
|
|
vcpkg_cmake_config_fixup(PACKAGE_NAME dnnl CONFIG_PATH lib/cmake/dnnl)
|
2020-12-31 14:38:55 +08:00
|
|
|
|
2020-12-17 16:12:26 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
2023-06-24 04:29:52 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/doc/dnnl/reference/html")
|
2020-12-17 16:12:26 +08:00
|
|
|
|
2023-06-24 04:29:52 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|