2020-05-25 02:18:37 +00:00
|
|
|
when defined(macosx):
|
|
|
|
import algorithm, strutils
|
|
|
|
|
|
|
|
if defined(release):
|
|
|
|
switch("nimcache", "nimcache/release/$projectName")
|
|
|
|
else:
|
|
|
|
switch("nimcache", "nimcache/debug/$projectName")
|
|
|
|
|
|
|
|
--threads:on
|
|
|
|
--opt:speed # -O3
|
|
|
|
--debugger:native # passes "-g" to the C compiler
|
|
|
|
--dynliboverrideall # don't use dlopen()
|
|
|
|
--define:ssl # needed by the stdlib to enable SSL procedures
|
|
|
|
|
|
|
|
if defined(macosx):
|
|
|
|
--tlsEmulation:off
|
2020-06-04 20:56:44 +00:00
|
|
|
switch("passL", "-lstdc++")
|
2020-05-25 02:18:37 +00:00
|
|
|
# DYLD_LIBRARY_PATH doesn't seem to work with Qt5
|
|
|
|
switch("passL", "-rpath" & " " & getEnv("QT5_LIBDIR"))
|
2020-06-04 20:56:44 +00:00
|
|
|
# statically linke these libs
|
|
|
|
switch("passL", "bottles/openssl/lib/libcrypto.a")
|
|
|
|
switch("passL", "bottles/openssl/lib/libssl.a")
|
|
|
|
switch("passL", "bottles/pcre/lib/libpcre.a")
|
2020-05-25 02:18:37 +00:00
|
|
|
# https://code.videolan.org/videolan/VLCKit/-/issues/232
|
|
|
|
switch("passL", "-Wl,-no_compact_unwind")
|
2020-06-04 20:56:44 +00:00
|
|
|
# set the minimum supported macOS version to 10.13
|
|
|
|
switch("passC", "-mmacosx-version-min=10.13")
|
2020-05-25 02:18:37 +00:00
|
|
|
else:
|
2020-06-04 20:56:44 +00:00
|
|
|
# dynamically link these libs, since we're opting out of dlopen()
|
|
|
|
switch("passL", "-lcrypto")
|
|
|
|
switch("passL", "-lssl")
|
|
|
|
# don't link libraries we're not actually using
|
|
|
|
switch("passL", "-Wl,-as-needed")
|
2020-05-25 02:18:37 +00:00
|
|
|
|
|
|
|
--define:chronicles_line_numbers # useful when debugging
|