Fix the waf build after the libresrc changes, and also tweak the script to properly handle dependency tracking with the generated files.

Originally committed to SVN as r4173.
This commit is contained in:
Kevin Ollivier 2010-03-13 17:50:51 +00:00
parent 277f1959ad
commit 9fcdfebf82
3 changed files with 28 additions and 13 deletions

View file

@ -19,16 +19,30 @@ import os
dir = os.path.abspath('.')
source_list = [
'src/bitmaps/16', 'src/bitmaps/24', 'src/bitmaps/misc/splash.png', 'src/bitmaps/misc/wxicon.png'
]
sources = ''
for source in source_list:
sources += ' %s/%s' % (dir, source)
def build(bld):
obj = bld.new_task_gen(
rule = dir + '/build/default/tools/common-respack %s/src/libresrc/libresrc.cpp' % dir + sources,
bld.new_task_gen(
rule = dir + '/build/default/tools/common-respack ${TGT} ${SRC}',
source = "default_mru.json",
target = 'default_config.cpp',
name = 'default_config',
after = 'common-respack',
)
bld.new_task_gen(
rule = dir + '/build/default/tools/common-respack ${TGT} ${SRC} ../src/bitmaps/16 ../src/bitmaps/24',
source = '../bitmaps/misc/splash.png ../bitmaps/misc/wxicon.png',
target = 'bitmap.cpp',
after = 'common-respack',
name = 'bitmap',
)
bld.add_group()
bld.new_task_gen(
features = 'cc cxx cstaticlib',
target = 'libresrc',
source = 'bitmap.cpp default_config.cpp libresrc.cpp',
includes = '.',
uselib = 'WX',
after = 'bitmap default_config',
)

View file

@ -22,7 +22,7 @@ import distutils.dir_util
def build(bld):
subdirs = ['libresrc']
uselib_local = []
uselib_local = ['libresrc']
includes = ['#', '.']
if Options.options.with_provider_video == 'ffmpegsource' or Options.options.with_provider_audio == 'ffmpegsource':
@ -45,10 +45,10 @@ def build(bld):
features = 'cc cxx cprogram',
target = 'aegisub',
includes = includes,
source = 'libresrc/libresrc.cpp',
defines = '',
uselib = 'GL CURL FONTCONFIG FREETYPE2 WX',
uselib_local = uselib_local)
uselib_local = uselib_local,
after = 'libresrc')
if sys.platform.startswith('darwin'):
excludes.append('bundledirs-test.c')

View file

@ -55,6 +55,7 @@ def configure(conf):
conf.check_tool('osx')
conf.env.append_value('CPPPATH', '/usr/local/aegisub-deps/include')
conf.env.append_value('CPPPATH', os.path.join(appdir, blddir, 'default', 'src', 'libresrc'))
conf.define('HAVE_GETTEXT', 1)