forked from status-im/status-desktop
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- unify the "build-..." targets - enable a debug build by default, to simplify development - bump vendor/DOtherSide - avoid DOtherSide checks for docs/tests-specific tools like Doxygen - switch to an in-place build for DOtherSide - silence the DOtherSide build when V=0, make it more verbose with V=1 - don't delete checked out submodules in the "clean" target - update build instructions in the README - centralise Nim compiler options in a top-level "config.nims" (except `-d:debug` which needs to be on the command line)
- Loading branch information
1 parent
5371f22
commit 4fe6d9b
Showing
7 changed files
with
132 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
when defined(macosx): | ||
import algorithm, strutils | ||
|
||
if defined(release): | ||
switch("nimcache", "nimcache/release/$projectName") | ||
else: | ||
switch("nimcache", "nimcache/debug/$projectName") | ||
|
||
proc linkLib(name: string): string = | ||
var resLib = name | ||
|
||
when defined(macosx): | ||
# In macOS Catalina, unversioned libraries may be broken stubs, so we need to | ||
# find a versioned one: https://github.com/status-im/nim-status-client/pull/209 | ||
var matches: seq[string] | ||
for path in listFiles("/usr/lib"): | ||
# /usr/lib/libcrypto.0.9.8.dylib | ||
let file = path[9..^1] | ||
# libcrypto.0.9.8.dylib | ||
if file.startsWith("lib" & name) and file != "lib" & name & ".dylib": | ||
matches.add(path) | ||
matches.sort(order = SortOrder.Descending) | ||
if matches.len > 0: | ||
resLib = matches[0] | ||
# Passing "/usr/lib/libcrypto.44.dylib" directly to the linker works for | ||
# dynamic linking. | ||
return resLib | ||
|
||
return "-l" & resLib | ||
|
||
--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 | ||
# DYLD_LIBRARY_PATH doesn't seem to work with Qt5 | ||
switch("passL", "-rpath" & " " & getEnv("QT5_LIBDIR")) | ||
switch("passL", "-lstdc++") | ||
# dynamically link these libs, since we're opting out of dlopen() | ||
switch("passL", linkLib("crypto")) | ||
switch("passL", linkLib("ssl")) | ||
# https://code.videolan.org/videolan/VLCKit/-/issues/232 | ||
switch("passL", "-Wl,-no_compact_unwind") | ||
else: | ||
switch("passL", linkLib("crypto") & " " & linkLib("ssl")) # dynamically link these libs, since we're opting out of dlopen() | ||
switch("passL", "-Wl,-as-needed") # don't link libraries we're not actually using | ||
|
||
--define:chronicles_line_numbers # useful when debugging |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# we need to link C++ libraries | ||
gcc.linkerexe="g++" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Submodule DOtherSide
updated
4 files
+27 −0 | .gitignore | |
+15 −3 | CMakeLists.txt | |
+14 −0 | DOtherSide.pc.cmake | |
+32 −16 | lib/CMakeLists.txt |