From 317830784e0614bb7e7b052e7bc4ebb626493988 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Wed, 25 Aug 2010 22:20:19 +0000 Subject: [PATCH] scons: normalize paths to make sure that trailing slashes are striped and the lib/include directories are removed with dirname --- SConstruct | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/SConstruct b/SConstruct index db82c864f..6f16de191 100644 --- a/SConstruct +++ b/SConstruct @@ -55,7 +55,7 @@ def regular_print(color,text,newline=True): print text def call(cmd, silent=False): - stdin, stderr = Popen(cmd,shell=True,stdout=PIPE,stderr=PIPE).communicate() + stdin, stderr = Popen(cmd, shell=True, stdout=PIPE, stderr=PIPE).communicate() if not stderr: return stdin.strip() elif not silent: @@ -555,9 +555,11 @@ def FindBoost(context, prefixes, thread_flag): search_lib = 'libboost_thread' else: search_lib = 'libboost_filesystem' - - prefixes.insert(0,os.path.dirname(env['BOOST_INCLUDES'])) - prefixes.insert(0,os.path.dirname(env['BOOST_LIBS'])) + + # note: must call normpath to strip trailing slash otherwise dirname + # does not remove 'lib' and 'include' + prefixes.insert(0,os.path.dirname(os.path.normpath(env['BOOST_INCLUDES']))) + prefixes.insert(0,os.path.dirname(os.path.normpath(env['BOOST_LIBS']))) for searchDir in prefixes: libItems = glob(os.path.join(searchDir, LIBDIR_SCHEMA, '%s*.*' % search_lib)) if not libItems: