2020-12-31 14:38:55 +08:00
|
|
|
vcpkg_fail_port_install(ON_ARCH "x86" "arm" ON_TARGET "uwp")
|
|
|
|
|
2020-12-17 16:12:26 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO oneapi-src/oneDNN
|
2021-09-29 23:36:49 +08:00
|
|
|
REF v2.3.2
|
|
|
|
SHA512 14B3E6E40F29250AAE1FC677E6723953CA3BFBC9544B32CA1AE51ABA35DAB53C8CFCC58DD57610E644EB324821F3F370A31E8D960B1E4D5AF0C066441ED7FF45
|
2020-12-17 16:12:26 +08:00
|
|
|
HEAD_REF master
|
|
|
|
)
|
|
|
|
|
|
|
|
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
|
|
|
set(DNNL_OPTIONS "-DDNNL_LIBRARY_TYPE=STATIC")
|
|
|
|
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")
|
|
|
|
|
|
|
|
# Copyright and license
|
2021-09-29 23:36:49 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|