コード例 #1
0
ファイル: utility.py プロジェクト: wobakj/avango
def make_vcproject(env, name, target_name):
    if not oshelper.os_is_windows():
        return

    sources = env.FindSourceFiles()
    sourceList = []
    prepend_string = ''

    if env['DEBUG']:
        mode = 'Debug'
    else:
        mode = 'Release'

    for s in sources:
        sourceList.append('..\\' + s.srcnode().path)

    build_target_list = []
    build_target_list.append('check-' + target_name)
    build_target_list.append(target_name)

    variant_list = []
    variant_list.append('Check|Win32')
    variant_list.append(mode + '|Win32')

    project = env.MSVSProject(
        target=name + env['MSVSPROJECTSUFFIX'],
        auto_build_solution=0,
        srcs=sourceList,
        #incs = includes,
        buildtarget=build_target_list,
        variant=variant_list)
    scons.Alias('vcprojects', project)
コード例 #2
0
ファイル: __init__.py プロジェクト: wobakj/avango
def add_search_path(env, library):
    """Add the named dependency to the search path of the given environment.
    *Note* that this function should not be called. Use the corresponding
    method from the Environment class instead."""

    libs = _config_store.get_library_path(library)
    include = _config_store.get_include_path(library)
    python = _config_store.get_python_path(library)
    env.Prepend(LIBPATH=libs, CPPPATH=include)
    env.PrependENVPath(oshelper.get_library_search_path_env(), libs)
    env.PrependENVPath('PYTHONPATH', python)


def add_library(env, library):
    """Add the libraries from the named dependency to the given enviroment."""
    libs = _config_store.get_libraries(library)
    env.Prepend(LIBS=libs)


def set_config(key, config):
    _config_store.set(key, config)


def set_config_flag(key, value):
    recipes.set_config_flag(key, value)


options = build_default_options()

scons.Default(scons.Alias('check'))