WIP on vcpkg integration

This commit is contained in:
DubbleClick 2025-03-24 14:35:10 +07:00
parent 161a3924d2
commit fe2bc9e4e1
6 changed files with 101 additions and 0 deletions

14
vcpkg-configuration.json Normal file
View File

@ -0,0 +1,14 @@
{
"default-registry": {
"kind": "git",
"baseline": "a76b33254af4092ff45f08ec5adcd9fd06468b43",
"repository": "https://github.com/microsoft/vcpkg"
},
"registries": [
{
"kind": "artifact",
"location": "https://github.com/microsoft/vcpkg-ce-catalog/archive/refs/heads/main.zip",
"name": "microsoft"
}
]
}

View File

@ -0,0 +1,4 @@
set(CMAKE_C_COMPILER /usr/bin/gcc)
set(CMAKE_CXX_COMPILER /usr/bin/g++)
set(CMAKE_AR /usr/bin/ar)
set(CMAKE_LINKER /usr/bin/ld.gold)

View File

@ -0,0 +1,10 @@
set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE static)
set(VCPKG_LIBRARY_LINKAGE static)
set(VCPKG_CMAKE_SYSTEM_NAME Linux)
set(VCPKG_BUILD_TYPE release)
set(VCPKG_C_FLAGS "-fPIC -fPIE")
set(VCPKG_CXX_FLAGS "-fPIC -fPIE")
set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${CMAKE_CURRENT_LIST_DIR}/x64-linux-glibc-toolchain.cmake")

View File

@ -0,0 +1,5 @@
set(CMAKE_C_COMPILER /usr/local/musl/bin/x86_64-linux-musl-gcc)
set(CMAKE_CXX_COMPILER /usr/local/musl/bin/x86_64-linux-musl-g++)
set(CMAKE_AR /usr/local/musl/bin/x86_64-linux-musl-ar)
set(CMAKE_LINKER /usr/local/musl/bin/x86_64-linux-musl-ld.gold)
set(CMAKE_CROSSCOMPILING TRUE)

View File

@ -0,0 +1,10 @@
set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE static)
set(VCPKG_LIBRARY_LINKAGE static)
set(VCPKG_CMAKE_SYSTEM_NAME Linux)
set(VCPKG_BUILD_TYPE release)
set(VCPKG_C_FLAGS "-fPIC -fPIE -static")
set(VCPKG_CXX_FLAGS "-fPIC -fPIE -static")
set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${CMAKE_CURRENT_LIST_DIR}/x64-linux-musl-toolchain.cmake")

58
vcpkg.json Normal file
View File

@ -0,0 +1,58 @@
{
"dependencies": [
"acl",
"aom",
"argon2",
"brotli",
"bzip2",
"c-ares",
"curl",
"freetype",
"gettext",
"gmp",
"grpc",
"icu",
"libavif",
"libde265",
"libevent",
"libffi",
{
"name": "libgd",
"features": [
"fontconfig",
"freetype",
"jpeg",
"png",
"tiff",
"webp"
]
},
"libiconv",
"libpng",
"librabbitmq",
"librdkafka",
"libsodium",
"libssh2",
"libuuid",
"libuv",
"libwebp",
"libxml2",
"libxslt",
"libyaml",
"libzip",
"lz4",
"mimalloc",
"ncurses",
"nghttp2",
"nghttp3",
"openldap",
"pkgconf",
"readline",
"snappy",
"sqlite3",
"tidy-html5",
"tiff",
"zlib",
"zstd"
]
}