From 85984c26afc2a44c0a76394ea5684467011c3109 Mon Sep 17 00:00:00 2001 From: Sebastien Vincent Date: Tue, 8 Aug 2017 18:04:11 +0200 Subject: [PATCH] Modify scons scripts to be able to compile on macOS with brew packages. --- SConstruct | 4 ++++ apps/freelan/SConscript | 10 +++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/SConstruct b/SConstruct index 0c3cb35f..36f78fd9 100644 --- a/SConstruct +++ b/SConstruct @@ -107,7 +107,11 @@ class FreelanEnvironment(Environment): self.Append(CXXFLAGS=['-arch', 'x86_64']) self.Append(CXXFLAGS=['-DBOOST_ASIO_DISABLE_KQUEUE']) self.Append(CXXFLAGS=['--stdlib=libc++']) + self.Append(CXXFLAGS=['-I/usr/local/opt/openssl/include']) + self.Append(CFLAGS=['-I/usr/local/opt/openssl/include']) self.Append(LDFLAGS=['--stdlib=libc++']) + self.Append(LDFLAGS=['-L/usr/local/opt/openssl/lib']) + self.Append(LIBPATH=['/usr/local/opt/openssl/lib']) if self.mode == 'debug': self.Append(CXXFLAGS=['-g']) diff --git a/apps/freelan/SConscript b/apps/freelan/SConscript index b27286b9..4b7ad1b4 100644 --- a/apps/freelan/SConscript +++ b/apps/freelan/SConscript @@ -13,7 +13,6 @@ libraries = [ 'kfather', 'iconvplus', 'boost_system', - 'boost_thread', 'boost_filesystem', 'boost_date_time', 'boost_program_options', @@ -23,6 +22,15 @@ libraries = [ 'crypto', ] +if sys.platform.startswith('darwin'): + libraries.extend([ + 'boost_thread-mt', + ]) +else: + libraries.extend([ + 'boost_thread', + ]) + if sys.platform.startswith('linux'): libraries.extend([ 'pthread',