aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2023-06-16 13:39:21 +0200
committerStefan Boberg <[email protected]>2023-06-16 13:39:21 +0200
commit9721f4ab712ab91fdf5d790d4c59605cb9ae3799 (patch)
tree885114c22d724bb2a3053c4fabffad7f3cb1d62d /src
parentadded GetProcessId (diff)
downloadzen-9721f4ab712ab91fdf5d790d4c59605cb9ae3799.tar.xz
zen-9721f4ab712ab91fdf5d790d4c59605cb9ae3799.zip
xmake dependency fixes
- curl is a dependency of zenhttp, not zencore - zencore only depends on crypto functions from openssl
Diffstat (limited to 'src')
-rw-r--r--src/zencore/xmake.lua23
-rw-r--r--src/zenhttp/xmake.lua20
2 files changed, 22 insertions, 21 deletions
diff --git a/src/zencore/xmake.lua b/src/zencore/xmake.lua
index 1be89c14a..ef68b4c3c 100644
--- a/src/zencore/xmake.lua
+++ b/src/zencore/xmake.lua
@@ -29,36 +29,17 @@ target('zencore')
add_options("zentrace")
add_packages(
"vcpkg::blake3",
- "vcpkg::cpr",
- "vcpkg::curl", -- required by cpr
"vcpkg::doctest",
"vcpkg::fmt",
"vcpkg::gsl-lite",
"vcpkg::json11",
"vcpkg::lz4",
"vcpkg::mimalloc",
- "vcpkg::openssl", -- required by curl
+ "vcpkg::openssl", -- required for crypto
"vcpkg::spdlog",
- "vcpkg::zlib", -- required by curl
"vcpkg::xxhash")
if is_plat("linux") then
- -- The 'vcpkg::openssl' package is two libraries; ssl and crypto, with
- -- ssl being dependent on symbols in crypto. When GCC-like linkers read
- -- object files from their command line, those object files only resolve
- -- symbols of objects previously encountered. Thus crypto must appear
- -- after ssl so it can fill out ssl's unresolved symbol table. Xmake's
- -- vcpkg support is basic and works by parsing .list files. Openssl's
- -- archives are listed alphabetically causing crypto to be _before_ ssl
- -- and resulting in link errors. The links are restated here to force
- -- xmake to use the correct order, and "syslinks" is used to force the
- -- arguments to the end of the line (otherwise they can appear before
- -- curl and cause more errors).
- add_syslinks("crypto")
- add_syslinks("dl")
- end
-
- if is_plat("linux") then
add_syslinks("rt")
end
@@ -66,4 +47,4 @@ target('zencore')
add_syslinks("Advapi32")
add_syslinks("Shell32")
add_syslinks("User32")
- end \ No newline at end of file
+ end
diff --git a/src/zenhttp/xmake.lua b/src/zenhttp/xmake.lua
index b0dbdbc79..b4154c0fa 100644
--- a/src/zenhttp/xmake.lua
+++ b/src/zenhttp/xmake.lua
@@ -8,7 +8,27 @@ target('zenhttp')
add_includedirs("include", {public=true})
add_deps("zencore")
add_packages(
+ "vcpkg::cpr",
+ "vcpkg::curl", -- required by cpr
+ "vcpkg::openssl", -- required by curl
+ "vcpkg::zlib", -- required by curl
"vcpkg::gsl-lite",
"vcpkg::http-parser"
)
add_options("httpsys")
+
+ if is_plat("linux") then
+ -- The 'vcpkg::openssl' package is two libraries; ssl and crypto, with
+ -- ssl being dependent on symbols in crypto. When GCC-like linkers read
+ -- object files from their command line, those object files only resolve
+ -- symbols of objects previously encountered. Thus crypto must appear
+ -- after ssl so it can fill out ssl's unresolved symbol table. Xmake's
+ -- vcpkg support is basic and works by parsing .list files. Openssl's
+ -- archives are listed alphabetically causing crypto to be _before_ ssl
+ -- and resulting in link errors. The links are restated here to force
+ -- xmake to use the correct order, and "syslinks" is used to force the
+ -- arguments to the end of the line (otherwise they can appear before
+ -- curl and cause more errors).
+ add_syslinks("crypto")
+ add_syslinks("dl")
+ end