28 lines
		
	
	
		
			815 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
		
			815 B
		
	
	
	
		
			Python
		
	
	
	
	
	
 | 
						|
 | 
						|
from SCons.Script import *
 | 
						|
 | 
						|
def versions(env: Environment, update: bool = False):
 | 
						|
    return [(1, 0)]
 | 
						|
 | 
						|
def dependencies(env: Environment, version) -> 'dict':
 | 
						|
    return {}
 | 
						|
 | 
						|
def cook(env: Environment, version) -> dict:
 | 
						|
    repo = env.GitBranch(repo_name = 'mikktspace', remote_url = 'https://github.com/mmikk/MikkTSpace.git', git_ref = 'master')
 | 
						|
    checkout_root = repo['checkout_root']
 | 
						|
    ccflags = env['CCFLAGS'].copy()
 | 
						|
    if env['COMPILER_FAMILY'] == 'cl':
 | 
						|
        ccflags.append('/wd4456')
 | 
						|
    lib_mikktspace = env.StaticLibrary(
 | 
						|
        CCFLAGS = ccflags,
 | 
						|
        CPPPATH = [checkout_root],
 | 
						|
        target = env['LIB_DIR'] + '/mikktspace',
 | 
						|
        source = [os.path.join(repo['checkout_root'], 'mikktspace.c')]
 | 
						|
    )
 | 
						|
    return {
 | 
						|
        'CPPPATH': [checkout_root],
 | 
						|
        'LIBS': [lib_mikktspace]
 | 
						|
    }
 | 
						|
 |