Files
tinygltf/attic/examples/common/nativefiledialog/test/SConstruct
Syoyo Fujita 5aa461e477 Deprecate legacy v1/v2/v3 C++ API; make v3 C the mainline
Move tiny_gltf.h/.cc, tinygltf_json.h, json.hpp, stb_image*, loader_example.cc,
examples/, wasm/, experimental/, legacy tests and fuzzers under attic/.

TinyGLTF v3 C (tiny_gltf_v3.h/.c + tinygltf_json_c.h) is now the mainline:
- CMakeLists.txt: v3 C tests only, installs only v3 files
- tests/Makefile and Makefile: build/run the v3 C testers
- test_runner.py: verifies v3 C tester output only (no v1 ground truth)
- CI workflows: build and test v3 C only (GCC/Clang/MSVC/Meson/sanitizers)
- README: v3 C quick start, testing, licenses; legacy moved to attic/
2026-07-31 21:42:31 +09:00

71 lines
1.6 KiB
Python

#
# Native file dialog
#
# Build tests
target_arch=str(Platform())
debug = int(ARGUMENTS.get( 'debug', 0 ))
files = {'test_opendialog': ['test_opendialog.c'],
'test_opendialogmultiple': ['test_opendialogmultiple.c'],
'test_savedialog': ['test_savedialog.c']}
test_env = Environment()
# Windows runtime library types
win_rtl = {'debug': '/MDd',
'release': '/MD'}
def set_debug(env):
if target_arch == 'win32':
env.Append( CFLAGS=['/Z7', # obj contains full symbols
win_rtl['debug'] ] )
else:
env.Append( CFLAGS=['-g'] )
def set_release(env):
if target_arch == 'win32':
env.Append( CFLAGS=[win_rtl['release'],
'/O2',
])
else:
env.Append( CFLAGS=['-O3'] )
def get_lib_name(base, is_debug):
if is_debug:
return base + '_d'
else:
return base
if debug:
set_debug(test_env)
else:
set_release(test_env)
test_env.Append( CPPPATH=['../src/include'], # API header path only, no internals allowed
LIBPATH=['../src'],
LIBS=get_lib_name('nfd', debug) )
# Cocoa OS X builds
if target_arch == 'darwin':
test_env.Append( FRAMEWORKS='AppKit' )
test_env.CC='clang -fcolor-diagnostics'
# Linux GTK+ 3 builds
elif target_arch == 'posix':
test_env.ParseConfig( 'pkg-config --cflags --libs gtk+-3.0' )
elif target_arch == 'win32':
test_env.Append(
LINKFLAGS=['/NODEFAULTLIB:LIBCMT'])
for codebase in files:
output_name = get_lib_name(codebase, debug)
test_env.Program( output_name, files[codebase] )