vcpkg/ports/libsmb2/portfile.cmake
2023-10-09 15:15:30 -07:00

29 lines
1.0 KiB
CMake

vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO sahlberg/libsmb2
REF 99125c96750e192e2c50176548bf461e4a28f135
SHA512 30cdc9bbcdcd384868e5865706b41f683b977ece4056040a29bb3b81ffdf83788ba8a39426132810b8cbbb778ae7db8e5e1be0b7c0a82d8beed75040de708240
HEAD_REF master
)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
# TODO: Add a feature to enable gssapi/krb5 support
-DCMAKE_DISABLE_FIND_PACKAGE_GSSAPI=ON
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(PACKAGE_NAME smb2 CONFIG_PATH "lib/cmake/${PORT}")
vcpkg_fixup_pkgconfig()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/smb2")
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")