mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-05 11:19:01 +08:00
31d54cc8b1
- [X] Changes comply with the [maintainer guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md) - [X] SHA512s are updated for each updated download - [ ] ~The "supports" clause reflects platforms that may be fixed by this new version~ - [ ] ~Any fixed [CI baseline](https://github.com/microsoft/vcpkg/blob/master/scripts/ci.baseline.txt) entries are removed from that file.~ - [ ] ~Any patches that are no longer applied are deleted from the port's directory.~ - [X] The version database is fixed by rerunning `./vcpkg x-add-version --all` and committing the result. - [X] Only one version is added to each modified port's versions file.
27 lines
884 B
CMake
27 lines
884 B
CMake
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO oneapi-src/oneDNN
|
|
REF "v${VERSION}"
|
|
SHA512 8a4ae6251e12ee641a432011da8360e08866ac005a5930d3a6278ce470d8b4a88afbd5538504274ca5e0bf053845efb41c834acaab83121d9d986a41f31ff718
|
|
HEAD_REF master
|
|
)
|
|
|
|
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
|
set(DNNL_OPTIONS "-DDNNL_LIBRARY_TYPE=STATIC")
|
|
endif()
|
|
|
|
vcpkg_cmake_configure(
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
OPTIONS ${DNNL_OPTIONS}
|
|
)
|
|
vcpkg_cmake_install()
|
|
|
|
# The port name and the find_package() name are different (onednn versus dnnl)
|
|
vcpkg_cmake_config_fixup(PACKAGE_NAME dnnl CONFIG_PATH lib/cmake/dnnl)
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/doc/dnnl/reference/html")
|
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|