[rhash] Add target include directories and export unofficial config.cmake (#25171)

Co-authored-by: Cheney-Wang <v-xincwa@microsoft.com>
This commit is contained in:
Cheney Wang 2022-06-11 01:54:05 +08:00 коммит произвёл GitHub
Родитель 233e6daf1d
Коммит d6541fff4b
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
5 изменённых файлов: 25 добавлений и 2 удалений

Просмотреть файл

@ -8,7 +8,19 @@ add_definitions(-DRHASH_XVERSION="${RHASH_XVERSION}")
add_library(rhash ${RHASH_SOURCES}) add_library(rhash ${RHASH_SOURCES})
set_target_properties(rhash PROPERTIES COMPILE_DEFINITIONS "IN_RHASH" DEFINE_SYMBOL "RHASH_EXPORTS") set_target_properties(rhash PROPERTIES COMPILE_DEFINITIONS "IN_RHASH" DEFINE_SYMBOL "RHASH_EXPORTS")
install(TARGETS rhash RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) target_include_directories(rhash INTERFACE $<INSTALL_INTERFACE:include>)
install(TARGETS rhash EXPORT unofficial-rhash-config
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)
install(EXPORT unofficial-rhash-config
FILE unofficial-rhash-config.cmake
NAMESPACE unofficial::rhash::
DESTINATION share/unofficial-rhash
)
if(NOT RHASH_SKIP_HEADERS) if(NOT RHASH_SKIP_HEADERS)
install(FILES rhash.h rhash_torrent.h DESTINATION include) install(FILES rhash.h rhash_torrent.h DESTINATION include)

Просмотреть файл

@ -17,5 +17,6 @@ vcpkg_cmake_configure(
vcpkg_cmake_install() vcpkg_cmake_install()
vcpkg_copy_pdbs() vcpkg_copy_pdbs()
vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-rhash)
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

Просмотреть файл

@ -1,6 +1,7 @@
{ {
"name": "rhash", "name": "rhash",
"version": "1.4.2", "version": "1.4.2",
"port-version": 1,
"description": "C library for computing a wide variety of hash sums", "description": "C library for computing a wide variety of hash sums",
"homepage": "https://github.com/rhash/RHash", "homepage": "https://github.com/rhash/RHash",
"license": "0BSD", "license": "0BSD",
@ -9,6 +10,10 @@
{ {
"name": "vcpkg-cmake", "name": "vcpkg-cmake",
"host": true "host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
} }
] ]
} }

Просмотреть файл

@ -6238,7 +6238,7 @@
}, },
"rhash": { "rhash": {
"baseline": "1.4.2", "baseline": "1.4.2",
"port-version": 0 "port-version": 1
}, },
"rhasheq": { "rhasheq": {
"baseline": "0.0.1", "baseline": "0.0.1",

Просмотреть файл

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "85de223344c08a1efc2f9f6ec6bcb69529851199",
"version": "1.4.2",
"port-version": 1
},
{ {
"git-tree": "385025c1a8f84dfaf6035c2d730fb4ae0d8b16fd", "git-tree": "385025c1a8f84dfaf6035c2d730fb4ae0d8b16fd",
"version": "1.4.2", "version": "1.4.2",