Reputation: 181
I recently wrote this simple waf build script:
#! /usr/bin/env python
# encoding: utf-8
def options(opt):
opt.load('compiler_cxx')
opt.load('msvs')
def configure(conf):
conf.load('compiler_cxx')
def build(bld):
print('build')
but the problem is that the outputed solution file is at the root of the project (where wscript is);
Would there be a way to generate the ide specific files into another directory (for instance, ide/msvs) ?
Upvotes: 2
Views: 1067
Reputation: 1405
You can redirect the output of the solution by using
out = os.path.join('my', 'out', 'dir')
which is relative to the top_dir
(https://waf.io/apidocs/Context.html?highlight=top_dir#waflib.Context.top_dir).
So in your case:
#! /usr/bin/env python
# encoding: utf-8
import os
out = os.path.join('my', 'out', 'dir')
def options(opt):
opt.load('compiler_cxx')
opt.load('msvs')
def configure(conf):
conf.load('compiler_cxx')
def build(bld):
print('build')
Upvotes: 1