mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-28 11:21:12 +08:00
50 lines
1.8 KiB
CMake
50 lines
1.8 KiB
CMake
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO axboe/liburing
|
|
REF "liburing-${VERSION}"
|
|
SHA512 d40d041b94bb0f004bd92890988c0e4b8a7bb9ae43659790ee4b19e5417f7dc5b9a554489834769ee71edfc6a44bcd87a5fca34845f61cc80e4e8e588c6950ec
|
|
HEAD_REF master
|
|
PATCHES
|
|
fix-configure.patch # ignore unsupported options, handle ENABLE_SHARED
|
|
disable-tests-and-examples.patch
|
|
)
|
|
|
|
# https://github.com/axboe/liburing/blob/liburing-2.8/src/Makefile#L13
|
|
set(ENV{CFLAGS} "$ENV{CFLAGS} -O3 -Wall -Wextra -fno-stack-protector")
|
|
|
|
# note: check ${SOURCE_PATH}/liburing.spec before updating configure options
|
|
vcpkg_configure_make(
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
COPY_SOURCE
|
|
DETERMINE_BUILD_TRIPLET
|
|
OPTIONS
|
|
[[--libdevdir=\${prefix}/lib]] # must match libdir
|
|
)
|
|
vcpkg_install_make()
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
# note: {SOURCE_PATH}/src/Makefile makes liburing.so from liburing.a.
|
|
# For dynamic, remove intermediate file liburing.a when install is finished.
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
|
file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/lib/liburing.a"
|
|
"${CURRENT_PACKAGES_DIR}/lib/liburing.a"
|
|
)
|
|
endif()
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/man")
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/${PORT}/man2")
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/${PORT}/man3")
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/${PORT}/man7")
|
|
|
|
# Cf. README
|
|
vcpkg_install_copyright(COMMENT [[
|
|
All software contained from liburing is dual licensed LGPL and MIT, see
|
|
COPYING and LICENSE, except for a header coming from the kernel which is
|
|
dual licensed GPL with a Linux-syscall-note exception and MIT, see
|
|
COPYING.GPL and <https://spdx.org/licenses/Linux-syscall-note.html>.
|
|
]]
|
|
FILE_LIST
|
|
"${SOURCE_PATH}/LICENSE"
|
|
"${SOURCE_PATH}/COPYING"
|
|
"${SOURCE_PATH}/COPYING.GPL"
|
|
)
|