2020-12-17 16:12:26 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO oneapi-src/oneDNN
|
2023-10-31 05:41:48 +08:00
|
|
|
REF "v${VERSION}"
|
2024-08-15 06:55:46 +08:00
|
|
|
SHA512 251da59164c102a6dd3c97e92aef58a879930c0def6e9fe6e43e68e1316ed0c9844796e69eecebbde12085900bfcda6c1ab30db6df24ba9826883171c87a964d
|
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}
|
2024-09-10 11:44:40 +08:00
|
|
|
-DDNNL_BUILD_DOC=OFF
|
|
|
|
-DDNNL_BUILD_EXAMPLES=OFF
|
|
|
|
-DDNNL_BUILD_TESTS=OFF
|
2020-12-17 16:12:26 +08:00
|
|
|
)
|
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
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|