vcpkg/ports/cub/portfile.cmake

32 lines
1002 B
CMake
Raw Normal View History

2018-11-10 07:31:40 +08:00
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO NVlabs/cub
2023-10-05 05:25:20 +08:00
REF "${VERSION}"
SHA512 f88fdf80c81b8b5d3d09797bf5e9a9e82e1365950b358e0ffc2141b465646c2054ce7e6a30ae07735fbaa69d07c9a8e9bab57c8ddb8a0db8426b27eadd045197
2018-11-10 07:31:40 +08:00
HEAD_REF master
PATCHES fix-usage.patch
2018-11-10 07:31:40 +08:00
)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DCUB_ENABLE_INSTALL_RULES=ON
-DCUB_ENABLE_HEADER_TESTING=OFF
-DCUB_ENABLE_TESTING=OFF
-DCUB_ENABLE_EXAMPLES=OFF
-DCUB_ENABLE_CPP_DIALECT_IN_NAMES=ON
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/cub)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/cub/cmake"
"${CURRENT_PACKAGES_DIR}/debug"
"${CURRENT_PACKAGES_DIR}/lib"
)
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
2018-11-10 07:31:40 +08:00
file(INSTALL "${SOURCE_PATH}/LICENSE.TXT" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)