diff options
Diffstat (limited to 'third_party/scons/scons-local/SCons/Tool/msvc.py')
-rw-r--r-- | third_party/scons/scons-local/SCons/Tool/msvc.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/third_party/scons/scons-local/SCons/Tool/msvc.py b/third_party/scons/scons-local/SCons/Tool/msvc.py index b0b7146..e253528 100644 --- a/third_party/scons/scons-local/SCons/Tool/msvc.py +++ b/third_party/scons/scons-local/SCons/Tool/msvc.py @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/msvc.py 3424 2008/09/15 11:22:20 scons" +__revision__ = "src/engine/SCons/Tool/msvc.py 3603 2008/10/10 05:46:45 scons" import os.path import re @@ -45,6 +45,7 @@ import SCons.Tool import SCons.Tool.msvs import SCons.Util import SCons.Warnings +import SCons.Scanner.RC CSuffixes = ['.c', '.C'] CXXSuffixes = ['.cc', '.cpp', '.cxx', '.c++', '.C++'] @@ -660,13 +661,17 @@ pch_action = SCons.Action.Action('$PCHCOM', '$PCHCOMSTR') pch_builder = SCons.Builder.Builder(action=pch_action, suffix='.pch', emitter=pch_emitter, source_scanner=SCons.Tool.SourceFileScanner) -res_action = SCons.Action.Action('$RCCOM', '$RCCOMSTR') + + +# Logic to build .rc files into .res files (resource files) +res_scanner = SCons.Scanner.RC.RCScan() +res_action = SCons.Action.Action('$RCCOM', '$RCCOMSTR') res_builder = SCons.Builder.Builder(action=res_action, src_suffix='.rc', suffix='.res', src_builder=[], - source_scanner=SCons.Tool.SourceFileScanner) -SCons.Tool.SourceFileScanner.add_scanner('.rc', SCons.Defaults.CScan) + source_scanner=res_scanner) + def generate(env): """Add Builders and construction variables for MSVC++ to an Environment.""" @@ -711,6 +716,7 @@ def generate(env): env['RC'] = 'rc' env['RCFLAGS'] = SCons.Util.CLVar('') + env['RCSUFFIXES']=['.rc','.rc2'] env['RCCOM'] = '$RC $_CPPDEFFLAGS $_CPPINCFLAGS $RCFLAGS /fo$TARGET $SOURCES' env['BUILDERS']['RES'] = res_builder env['OBJPREFIX'] = '' |