From 3556ae5325f7ac12d2a51aaf5514c9bbd4cffb1d Mon Sep 17 00:00:00 2001 From: Alex Dupre Date: Wed, 26 Jun 2013 12:01:22 +0200 Subject: [PATCH] Use pkg-config for protobuf, it works also on FreeBSD. Do not add sources/headers to OBJECT_FILES. --- SConstruct | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/SConstruct b/SConstruct index 505315841d..b63f94d168 100644 --- a/SConstruct +++ b/SConstruct @@ -49,6 +49,8 @@ else: # Use openssl env.ParseConfig('pkg-config --cflags --libs openssl') +# Use protobuf +env.ParseConfig('pkg-config --cflags --libs protobuf') # The required version of boost is documented in the README file. # @@ -143,15 +145,9 @@ if not FreeBSD: ] ) -# Apparently, pkg-config --libs protobuf on bsd fails to provide this necessary include dir. -if FreeBSD: - env.Append(LINKFLAGS = ['-I/usr/local/include']) - env.Append(CXXFLAGS = ['-DOS_FREEBSD']) - env.Append( LIBS = [ 'rt', # for clock_nanosleep in beast - 'protobuf', 'z' ] ) @@ -183,7 +179,7 @@ TAG_SRCS = copy.copy(COMPILED_FILES) # Derive the object files from the source files. OBJECT_FILES = [] -OBJECT_FILES += PROTO_SRCS +OBJECT_FILES.append(PROTO_SRCS[0]) for file in COMPILED_FILES: OBJECT_FILES.append('build/obj/' + file)