diff options
Diffstat (limited to 'wscript')
-rw-r--r-- | wscript | 28 |
1 files changed, 28 insertions, 0 deletions
@@ -237,6 +237,28 @@ def build(bld): cxxflags = ['-fPIC', '-std=c++11']) autowaf.use_lib(bld, obj, libs + ' QT5') + # Darwin version + if bld.env.DEST_OS == 'darwin': + obj = bld(features = 'c cxx cxxprogram', + source = source + ' src/jalv_osx.m', + target = 'Jalv.app/Contents/Jalv', + includes = ['.', 'src'], + lib = ['pthread'], + framework = ['Cocoa'], + install_path = '${BINDIR}') + autowaf.use_lib(bld, obj, libs + ' GTKMM2') + + for i in bld.path.ant_glob('src/osx/*.xib'): + bld(rule='ibtool --compile ${TGT} ${SRC}', + source = i, + target = 'Jalv.app/Contents/Resources/' + i.name.replace('.xib', '.nib')) + + for i in bld.path.ant_glob('src/osx/*', resursive=True): + bld(features = 'subst', + is_copy = True, + source = i, + target = 'Jalv.app/Contents/Resources/' + i.name) + # Man pages bld.install_files('${MANDIR}/man1', bld.path.ant_glob('doc/*.1')) @@ -261,3 +283,9 @@ def posts(ctx): { 'Author' : 'drobilla', 'Tags' : 'Hacking, LAD, LV2, Jalv' }, os.path.join(out, 'posts')) + +# Alias .m files to be compiled the same as .c files, gcc will do the right thing. +from waflib import TaskGen +@TaskGen.extension('.m') +def m_hook(self, node): + return self.create_compiled_task('c', node) |