Fixed compilation with MSVC.
This commit is contained in:
@@ -1,14 +1,25 @@
|
||||
|
||||
import os
|
||||
import re
|
||||
from SCons.Script import *
|
||||
|
||||
def _build_lib_name(env: Environment) -> str:
|
||||
if os.name == 'posix':
|
||||
return {
|
||||
'debug': 'png16d'
|
||||
}.get(env['BUILD_TYPE'], 'png16')
|
||||
elif os.name == 'nt':
|
||||
return {
|
||||
'debug': 'libpng16_staticd'
|
||||
}.get(env['BUILD_TYPE'], 'libpng16_static')
|
||||
else:
|
||||
raise Exception('libpng is not supported yet on this OS')
|
||||
|
||||
def _git_cook(env: Environment, repo: dict) -> dict:
|
||||
lib_zlib = env.Cook('zlib')
|
||||
checkout_root = repo['checkout_root']
|
||||
build_result = env.CMakeProject(checkout_root, dependencies = [lib_zlib])
|
||||
lib_name = {
|
||||
'debug': 'png16d'
|
||||
}.get(env['BUILD_TYPE'], 'png16')
|
||||
lib_name = _build_lib_name(env)
|
||||
return {
|
||||
'CPPPATH': build_result['CPPPATH'],
|
||||
'LIBS': [env.FindLib(lib_name, paths=build_result['LIBPATH'])]
|
||||
|
||||
Reference in New Issue
Block a user