vcpkg/ports/libfido2/portfile.cmake
Lily Wang edc84ff66e
[libfido2] Update to 1.15.0 (#41471)
Co-authored-by: LilyWangLL <4945507022qq.com>
2024-10-22 14:26:45 -07:00

32 lines
966 B
CMake

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Yubico/libfido2
REF ${VERSION}
SHA512 97932ca1a9f8d1bb3cb4b4a8d56ef70085d19ad2bd27c67944fa17ed033bfa45d28d7ad3fa318723e79b17ef5a882ac4f999ad8a6b9965c58665d99c4da7b5ee
HEAD_REF main
PATCHES
"fix_cmakelists.patch"
)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" LIBFIDO2_BUILD_STATIC)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" LIBFIDO2_BUILD_SHARED)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DBUILD_EXAMPLES=OFF
-DBUILD_MANPAGES=OFF
-DBUILD_STATIC_LIBS=${LIBFIDO2_BUILD_STATIC}
-DBUILD_SHARED_LIBS=${LIBFIDO2_BUILD_SHARED}
-DBUILD_TOOLS=OFF
-DBUILD_TESTS=OFF
)
vcpkg_cmake_install()
vcpkg_copy_pdbs()
vcpkg_fixup_pkgconfig()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")