mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-21 23:00:36 +08:00
dc5a1d3664
* [libu2f-server] Fix wrong include reference * [libu2f-server] Added missing files CONTROL an portfile * Replace the patch with vcpkg_replace_string to fix up a header * Update ports/libu2f-server/CONTROL Co-authored-by: Phoebe <20694052+PhoebeHui@users.noreply.github.com> Co-authored-by: Phoebe <20694052+PhoebeHui@users.noreply.github.com>
38 lines
1.3 KiB
CMake
38 lines
1.3 KiB
CMake
include(vcpkg_common_functions)
|
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO Yubico/libu2f-server
|
|
REF libu2f-server-1.1.0
|
|
SHA512 085f8e7d74c1efb347747b8930386f18ba870f668f82e9bd479c9f8431585c5dc7f95b2f6b82bdd3a6de0c06f8cb2fbf51c363ced54255a936ab96536158ee59
|
|
HEAD_REF master
|
|
PATCHES
|
|
windows.patch
|
|
strndup-fix.patch
|
|
)
|
|
|
|
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
|
file(COPY ${CMAKE_CURRENT_LIST_DIR}/u2f-server-version.h DESTINATION ${SOURCE_PATH}/u2f-server)
|
|
|
|
vcpkg_configure_cmake(
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
PREFER_NINJA
|
|
)
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
# The include file must be patched after the build has completed, because the source files use the wrong subdirectory name!
|
|
vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/libu2f-server/u2f-server.h
|
|
"#include <u2f-server/u2f-server-version.h>"
|
|
"#include <libu2f-server/u2f-server-version.h>"
|
|
)
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
|
vcpkg_copy_pdbs()
|
|
|
|
# Handle copyright
|
|
configure_file(${SOURCE_PATH}/COPYING ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)
|