import api, smack, vs2010 cpp_filter = ['*.cpp', '*.h'] make = smack.make() # set the current workspace filter to 'Solution' make.setWorkspace('Solution') # set the current project filter to 'HelloWorld' make.setProject('HelloWorld') # set build configuration values for the project 'HelloWorld' in the workspace 'Solution' make.set('type', 'executable') make.set('include_path', 'd:/HelloWorld/include') make.set('files', api.inputs().addFile('d:/HelloWorld/source/main.cpp')) # set the current build filter to 'SingleDebugBuild' make.setBuild('SingleDebugBuild') # set build configuration for the build 'SingleDebugBuild' of the project 'HelloWorld' in the workspace 'Solution' make.set('cflags', ['debug', 'O0']) make.set('define', '_DEBUG') # toolchains to generate toolchains = [ { 'target': 'windows', 'arch': ['x86', 'x64'], }, ]
#------------------------------------------------------------------------------ # Workspace #------------------------------------------------------------------------------ make.setWorkspace('gs') make.set('type', 'staticlib') #------------------------------------------------------------------------------ #------------------------------------------------------------------------------ # Projects #------------------------------------------------------------------------------ make.setGroup('core') make.setProject('platform') make.set('include_path', rootPath('platform')) make.set('files', api.inputs().add(rootPath('platform'), cpp_filter)) make.setProject('framework') make.set('depends', 'platform') make.set('include_path', rootPath('framework')) make.set('files', api.inputs().add(rootPath('framework'), cpp_filter)) make.setProject('engine') make.set('depends', 'framework') make.set('include_path', rootPath('engine')) make.set('files', api.inputs().add(rootPath('engine'), cpp_filter)) make.setModContext('link', 'd3d9', {'target': 'windows', 'build': 'Debug'}) #------------------------------------------------------------------------------ # Modules #------------------------------------------------------------------------------