-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathprelude.nim
34 lines (28 loc) · 1002 Bytes
/
prelude.nim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import os
import strformat
# Socket definitions
import nativesockets
{.passc: "-DNGTCP2_STATICLIB".}
when defined(windows):
{.passl: "-lws2_32".}
{.passc: "-D_WINDOWS".}
else:
{.passc: "-DHAVE_UNISTD_H".}
when defined(macosx):
{.passl: "-L/opt/homebrew/opt/openssl@3/lib -lcrypto".}
{.passc: "-I/opt/homebrew/opt/openssl@3/include".}
else:
{.passl: "-lcrypto".}
const root = currentSourcePath.parentDir
const libIncludes = root/"build"/"lib"/"includes"
const ngtcp2Crypto = root/"libs"/"ngtcp2"/"crypto"
const ngtcp2CryptoIncludes = root/"libs"/"ngtcp2"/"crypto"/"includes"
const ngtcp2Lib = root/"libs"/"ngtcp2"/"lib"
const ngtcp2LibIncludes = root/"libs"/"ngtcp2"/"lib"/"includes"
const picotlsInclude = root/"libs"/"picotls"/"include"
{.passc: fmt"-I{libIncludes}".}
{.passc: fmt"-I{ngtcp2Crypto}".}
{.passc: fmt"-I{ngtcp2CryptoIncludes}".}
{.passc: fmt"-I{ngtcp2Lib}".}
{.passc: fmt"-I{ngtcp2LibIncludes}".}
{.passc: fmt"-I{picotlsInclude}".}