mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-30 04:27:23 +08:00
8f4ad058be
* [unrar] msbuild * v db
33 lines
1.1 KiB
CMake
33 lines
1.1 KiB
CMake
set(UNRAR_VERSION "6.1.7")
|
|
set(UNRAR_SHA512 b1a95358ff66b0e049597bbc4e1786d0bc909a8aff4aca94ee793d0d5a3c8b052eb347d88f44b6bc2e6231e777f1b711c198711118ae9ffbe8db2f72e7fbe846)
|
|
set(UNRAR_FILENAME unrarsrc-${UNRAR_VERSION}.tar.gz)
|
|
set(UNRAR_URL https://www.rarlab.com/rar/${UNRAR_FILENAME})
|
|
|
|
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
|
|
|
|
#SRC
|
|
vcpkg_download_distfile(ARCHIVE
|
|
URLS ${UNRAR_URL}
|
|
FILENAME ${UNRAR_FILENAME}
|
|
SHA512 ${UNRAR_SHA512}
|
|
)
|
|
vcpkg_extract_source_archive(
|
|
SOURCE_PATH
|
|
ARCHIVE "${ARCHIVE}"
|
|
SOURCE_BASE ${UNRAR_VERSION}
|
|
PATCHES msbuild-use-default-sma.patch
|
|
)
|
|
|
|
vcpkg_msbuild_install(
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
PROJECT_SUBPATH "UnRARDll.vcxproj"
|
|
)
|
|
|
|
#INCLUDE (named dll.hpp in source, and unrar.h in all rarlabs distributions)
|
|
file(INSTALL "${SOURCE_PATH}/dll.hpp" DESTINATION "${CURRENT_PACKAGES_DIR}/include" RENAME unrar.h)
|
|
|
|
configure_file("${CMAKE_CURRENT_LIST_DIR}/Config.cmake.in" "${CURRENT_PACKAGES_DIR}/share/unofficial-unrar/unofficial-unrar-config.cmake" @ONLY)
|
|
|
|
#COPYRIGHT
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")
|