2016-10-17 08:50:25 +02:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
2015-05-03 15:18:56 -06:00
|
|
|
Import('env')
|
|
|
|
|
2016-10-30 18:57:40 +01:00
|
|
|
env.drivers_sources = []
|
2016-05-21 20:07:32 -03:00
|
|
|
|
2016-10-15 12:39:28 +02:00
|
|
|
# OS drivers
|
2016-11-01 00:24:30 +01:00
|
|
|
SConscript('unix/SCsub')
|
|
|
|
SConscript('windows/SCsub')
|
2016-10-15 12:39:28 +02:00
|
|
|
|
|
|
|
# Sounds drivers
|
2016-11-01 00:24:30 +01:00
|
|
|
SConscript('alsa/SCsub')
|
2017-09-29 15:22:42 -03:00
|
|
|
SConscript('coreaudio/SCsub')
|
2016-11-01 00:24:30 +01:00
|
|
|
SConscript('pulseaudio/SCsub')
|
2016-10-15 12:39:28 +02:00
|
|
|
if (env["platform"] == "windows"):
|
2017-08-27 14:01:34 -03:00
|
|
|
SConscript("wasapi/SCsub")
|
2017-09-25 00:04:49 -04:00
|
|
|
if env['xaudio2']:
|
2016-11-01 00:24:30 +01:00
|
|
|
SConscript("xaudio2/SCsub")
|
2016-10-15 12:39:28 +02:00
|
|
|
|
2018-07-14 09:11:28 -03:00
|
|
|
# Midi drivers
|
|
|
|
SConscript('alsamidi/SCsub')
|
|
|
|
SConscript('coremidi/SCsub')
|
|
|
|
SConscript('winmidi/SCsub')
|
|
|
|
|
2016-10-15 12:39:28 +02:00
|
|
|
# Graphics drivers
|
2020-03-08 01:52:11 +01:00
|
|
|
if (env["platform"] != "server" and env["platform"] != "javascript"):
|
2019-06-11 15:43:37 -03:00
|
|
|
# SConscript('gles2/SCsub')
|
2019-06-07 13:07:57 -03:00
|
|
|
SConscript('vulkan/SCsub')
|
2017-12-26 20:36:18 +01:00
|
|
|
SConscript('gl_context/SCsub')
|
|
|
|
else:
|
|
|
|
SConscript('dummy/SCsub')
|
2015-05-03 15:18:56 -06:00
|
|
|
|
2016-10-15 12:39:28 +02:00
|
|
|
# Core dependencies
|
2016-11-01 00:24:30 +01:00
|
|
|
SConscript("png/SCsub")
|
2019-07-28 13:42:15 -03:00
|
|
|
SConscript("spirv-reflect/SCsub")
|
2016-10-15 12:39:28 +02:00
|
|
|
|
2017-09-25 00:04:49 -04:00
|
|
|
if env['vsproj']:
|
2017-11-19 13:55:38 -07:00
|
|
|
import os
|
|
|
|
path = os.getcwd()
|
|
|
|
# Change directory so the path resolves correctly in the function call.
|
|
|
|
os.chdir("..")
|
2016-10-30 18:44:57 +01:00
|
|
|
env.AddToVSProject(env.drivers_sources)
|
2017-11-19 13:55:38 -07:00
|
|
|
os.chdir(path)
|
2015-05-03 15:18:56 -06:00
|
|
|
|
2019-12-09 19:22:08 +01:00
|
|
|
env.add_source_files(env.drivers_sources, "*.cpp")
|
|
|
|
|
|
|
|
lib = env.add_library("drivers", env.drivers_sources)
|
|
|
|
env.Prepend(LIBS=[lib])
|