2020-12-17 02:12:26 -06:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO oneapi-src/oneDNN
|
2023-01-31 22:51:11 +01:00
|
|
|
REF 3fef24ec08eb89a2c4be4425162c0651af7f1de3
|
|
|
|
SHA512 3b012fcc92cf39b3205784f5f11607a8af9420d5affccb54079b275c7214dd93daa2ca1e29032de06483126eb103a85d2665da5291995b0f1e5e9978d4290462
|
2020-12-17 02:12:26 -06:00
|
|
|
HEAD_REF master
|
|
|
|
)
|
|
|
|
|
|
|
|
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
2021-11-16 01:33:05 +01:00
|
|
|
set(DNNL_OPTIONS "-DDNNL_LIBRARY_TYPE=STATIC")
|
2020-12-17 02:12:26 -06:00
|
|
|
endif()
|
|
|
|
|
2021-09-29 17:36:49 +02:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2020-12-17 02:12:26 -06:00
|
|
|
OPTIONS ${DNNL_OPTIONS}
|
|
|
|
)
|
2021-09-29 17:36:49 +02:00
|
|
|
vcpkg_cmake_install()
|
2020-12-17 02:12:26 -06:00
|
|
|
|
2020-12-31 00:38:55 -06:00
|
|
|
# The port name and the find_package() name are different (onednn versus dnnl)
|
2021-09-29 17:36:49 +02:00
|
|
|
vcpkg_cmake_config_fixup(PACKAGE_NAME dnnl CONFIG_PATH lib/cmake/dnnl)
|
2020-12-31 00:38:55 -06:00
|
|
|
|
2020-12-17 02:12:26 -06:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
|
|
|
|
|
|
|
# Copyright and license
|
2021-09-29 17:36:49 +02:00
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|