diff --git a/SModule b/SModule new file mode 100644 index 0000000..3bc29b7 --- /dev/null +++ b/SModule @@ -0,0 +1,72 @@ + +import json + + +Import('env') + +# Iwa +src_files = Split(""" + source/addon.cpp + source/buffer.cpp + source/command.cpp + source/descriptor_set.cpp + source/device.cpp + source/device_memory.cpp + source/event.cpp + source/fence.cpp + source/image.cpp + source/input.cpp + source/instance.cpp + source/object.cpp + source/pipeline.cpp + source/render_pass.cpp + source/semaphore.cpp + source/serialization.cpp + source/shader_module.cpp + source/swapchain.cpp + source/texture.cpp + source/type_meta.cpp + source/window.cpp + + source/app/vulkan_application.cpp + + source/io/bitmap.cpp + source/io/font.cpp + source/io/mesh.cpp + + source/resource/bitmap.cpp + source/resource/font.cpp + + source/util/glsl_compiler.cpp + source/util/growing_descriptor_pool.cpp + source/util/image_reference.cpp + source/util/reflect_glsl.cpp + source/util/render_loop.cpp + source/util/shader_meta.cpp + source/util/texture_atlas.cpp + source/util/vertex_layout.cpp + source/util/vkutil.cpp +""") + +with open('dependencies.json', 'r') as f: + dependencies = env.DepsFromJson(json.load(f)) + +include_dir = env.Dir('include') + +env.Append(CPPDEFINES = ['GLM_FORCE_DEPTH_ZERO_TO_ONE', 'GLM_FORCE_RADIANS']) +env.Append(JINJA_TEMPLATE_SEARCHPATH = [env.Dir('data/jinja')]) +env.Append(JINJA_CONFIG_SEARCHPATH = [env.Dir('data/config')]) +lib_iwa = env.UnityStaticLibrary( + target = env['LIB_DIR'] + '/iwa', + source = src_files, + dependencies = dependencies, + CPPPATH = [include_dir] +) + +LIB_CONFIG = { + 'CPPPATH': [include_dir], + 'CPPDEFINES': ['GLM_FORCE_DEPTH_ZERO_TO_ONE', 'GLM_FORCE_RADIANS'], + 'LIBS': [lib_iwa], +} + +Return('LIB_CONFIG') diff --git a/dependencies.json b/dependencies.json new file mode 100644 index 0000000..08d39e1 --- /dev/null +++ b/dependencies.json @@ -0,0 +1,12 @@ +{ + "fmt": {}, + "magic_enum": {}, + "glslang": {}, + "glm": {}, + "mijin": {}, + "SDL": {}, + "stb": {}, + "VulkanHeaders": {}, + "argparse": {}, + "yaml-cpp": {} +}