scons : src 并包含目录 [英] scons : src and include dirs

查看:39
本文介绍了scons : src 并包含目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以提供一个允许以下结构的 scons 配置文件

can someone give a scons config file which allows the following structure

toplevel/
        /src - .cc files
        /include .h files

在顶层我想要 o 和最终的 exe.

at top level I want the o and final exe.

推荐答案

env=Environment(CPPPATH='/usr/include/glib-2.0/:/usr/lib/glib-2.0/include:include',
                CPPDEFINES=[],
                LIBS=['glib-2.0']) 

if ARGUMENTS.get('debug', 0):
    env.Append(CCFLAGS = ' -g')

env.Program('template', Glob('src/*.cc'))

辛苦了.谢谢.

这篇关于scons : src 并包含目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆