[unrar] Add vcpkg-cmake-wrapper and usage (#23482)

* [unrar] Add vcpkg-cmake-wrapper and usage

* update version

* [unrar] Add Config.cmake

* update version

* Add license

* update version

* Remove usage

* update version

* Add unofficial

* update version

Co-authored-by: Lily Wang <v-lilywang@microsoft.com>
This commit is contained in:
LilyWangLL 2022-03-16 13:55:08 -07:00 committed by GitHub
parent 61f40a1d97
commit 591014689f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 32 additions and 2 deletions

View File

@ -0,0 +1,22 @@
get_filename_component(_unrar_root "${CMAKE_CURRENT_LIST_FILE}" PATH)
get_filename_component(_unrar_root "${_unrar_root}" PATH)
get_filename_component(_unrar_root "${_unrar_root}" PATH)
set(_unrar_lib "${_unrar_root}/lib/unrar.lib")
if (EXISTS "${_unrar_lib}")
add_library(unofficial::unrar::unrar INTERFACE IMPORTED)
set_target_properties(unofficial::unrar::unrar PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${_unrar_root}/include")
set_target_properties(unofficial::unrar::unrar PROPERTIES IMPORTED_LOCATION "${_unrar_lib}")
set_property(TARGET unofficial::unrar::unrar APPEND PROPERTY IMPORTED_CONFIGURATIONS)
set(unrar_FOUND TRUE)
else()
set(unrar_FOUND FALSE)
endif()
unset(_unrar_lib)
unset(_unrar_root)

View File

@ -36,5 +36,7 @@ file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/unrar.lib" DESTIN
vcpkg_copy_pdbs()
configure_file("${CMAKE_CURRENT_LIST_DIR}/Config.cmake.in" "${CURRENT_PACKAGES_DIR}/share/unofficial-unrar/unofficial-unrar-config.cmake" @ONLY)
#COPYRIGHT
file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

View File

@ -1,8 +1,9 @@
{
"name": "unrar",
"version": "5.8.1",
"port-version": 2,
"port-version": 3,
"description": "rarlab's unrar library",
"homepage": "https://www.rarlab.com",
"license": null,
"supports": "windows & !uwp & !arm & !static"
}

View File

@ -7138,7 +7138,7 @@
},
"unrar": {
"baseline": "5.8.1",
"port-version": 2
"port-version": 3
},
"upb": {
"baseline": "2021-10-19",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "d2ade299ed837817b3d02522f990af3a64cb938b",
"version": "5.8.1",
"port-version": 3
},
{
"git-tree": "4d39c9643a67338a3252672f3c5910891c6a87cd",
"version": "5.8.1",