From 77ffb83ddc9493f10750169f3b370f61d8a9a5f6 Mon Sep 17 00:00:00 2001 From: Sergey Fedorov Date: Mon, 5 May 2025 05:44:05 +0800 Subject: [PATCH] Fix SConstruct --- SConstruct | 23 ++++++++++------------- apps/freelan/SConscript | 10 +++++----- 2 files changed, 15 insertions(+), 18 deletions(-) diff --git SConstruct SConstruct index 6fc3506d..e3bb68de 100644 --- SConstruct +++ SConstruct @@ -114,23 +114,20 @@ class FreelanEnvironment(Environment): elif os.path.basename(self['CXX']).startswith('g++'): self.Append(CXXFLAGS=['-Wno-missing-field-initializers']) - self.Append(CXXFLAGS=['--std=c++11']) + self.Append(CXXFLAGS=['-std=c++11']) self.Append(CXXFLAGS=['-Wall']) self.Append(CXXFLAGS=['-Wextra']) - self.Append(CXXFLAGS=['-Werror']) self.Append(CXXFLAGS=['-pedantic']) - #self.Append(CXXFLAGS=['-Wshadow']) - self.Append(LDFLAGS=['--std=c++11']) + self.Append(CXXFLAGS=['-I@BOOST@/include']) + self.Append(CXXFLAGS=['-I@OPENSSL@/include']) + self.Append(CFLAGS=['-I@OPENSSL@/include']) + self.Append(LDFLAGS=['-L@BOOST@/lib']) + self.Append(LDFLAGS=['-L@OPENSSL@/lib']) + self.Append(LIBPATH=['@BOOST@/lib']) + self.Append(LIBPATH=['@OPENSSL@/lib']) if sys.platform.startswith('darwin'): - 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 sys.platform.startswith('freebsd'): self.Append(CXXFLAGS=['-I/usr/local/include', '-Wno-shadow', '-Wno-nested-anon-types', '-Wno-unused-parameter']) @@ -161,7 +158,7 @@ class FreelanEnvironment(Environment): if self.upnp == 'yes': self.Append(CXXFLAGS=['-DUSE_UPNP']) - self.Append(CPPDEFINES=r'FREELAN_INSTALL_PREFIX="\"%s\""' % self.prefix) + self.Append(CPPDEFINES=r'FREELAN_INSTALL_PREFIX="\"@PREFIX@\""') def RGlob(self, path, patterns=None): """ @@ -233,7 +230,7 @@ if mode in ('all', 'debug'): Alias('all', apps + help + samples) if sys.platform.startswith('darwin'): - retail_prefix = '/usr/local' + retail_prefix = '@PREFIX@' env = FreelanEnvironment(mode='retail', prefix=retail_prefix, mongoose=mongoose, upnp=upnp) libraries, includes, apps, samples, configurations, help = SConscript('SConscript', exports='env', variant_dir=os.path.join('build', env.mode)) package = SConscript('packaging/osx/SConscript', exports='env apps configurations retail_prefix help') diff --git apps/freelan/SConscript apps/freelan/SConscript index e96525b5..e1937e52 100644 --- apps/freelan/SConscript +++ apps/freelan/SConscript @@ -11,11 +11,11 @@ libraries = [ 'executeplus', 'kfather', 'iconvplus', - 'boost_system', - 'boost_filesystem', - 'boost_date_time', - 'boost_program_options', - 'boost_iostreams', + 'boost_system-mt', + 'boost_filesystem-mt', + 'boost_date_time-mt', + 'boost_program_options-mt', + 'boost_iostreams-mt', 'curl', 'ssl', 'crypto',