initial commit, 4.5 stable
Some checks failed
🔗 GHA / 📊 Static checks (push) Has been cancelled
🔗 GHA / 🤖 Android (push) Has been cancelled
🔗 GHA / 🍏 iOS (push) Has been cancelled
🔗 GHA / 🐧 Linux (push) Has been cancelled
🔗 GHA / 🍎 macOS (push) Has been cancelled
🔗 GHA / 🏁 Windows (push) Has been cancelled
🔗 GHA / 🌐 Web (push) Has been cancelled
Some checks failed
🔗 GHA / 📊 Static checks (push) Has been cancelled
🔗 GHA / 🤖 Android (push) Has been cancelled
🔗 GHA / 🍏 iOS (push) Has been cancelled
🔗 GHA / 🐧 Linux (push) Has been cancelled
🔗 GHA / 🍎 macOS (push) Has been cancelled
🔗 GHA / 🏁 Windows (push) Has been cancelled
🔗 GHA / 🌐 Web (push) Has been cancelled
This commit is contained in:
68
modules/ktx/SCsub
Normal file
68
modules/ktx/SCsub
Normal file
@@ -0,0 +1,68 @@
|
||||
#!/usr/bin/env python
|
||||
from misc.utility.scons_hints import *
|
||||
|
||||
Import("env")
|
||||
Import("env_modules")
|
||||
|
||||
env_ktx = env_modules.Clone()
|
||||
|
||||
# libktx thirdparty source files
|
||||
|
||||
thirdparty_obj = []
|
||||
|
||||
thirdparty_dir = "#thirdparty/libktx/"
|
||||
thirdparty_sources = [
|
||||
"lib/basis_transcode.cpp",
|
||||
"lib/checkheader.c",
|
||||
"lib/filestream.c",
|
||||
"lib/hashlist.c",
|
||||
"lib/memstream.c",
|
||||
"lib/miniz_wrapper.cpp",
|
||||
"lib/swap.c",
|
||||
"lib/texture.c",
|
||||
"lib/texture1.c",
|
||||
"lib/texture2.c",
|
||||
"lib/vkformat_check.c",
|
||||
"lib/vkformat_check_variant.c",
|
||||
"lib/vkformat_typesize.c",
|
||||
"external/dfdutils/createdfd.c",
|
||||
"external/dfdutils/colourspaces.c",
|
||||
"external/dfdutils/interpretdfd.c",
|
||||
"external/dfdutils/printdfd.c",
|
||||
"external/dfdutils/queries.c",
|
||||
"external/dfdutils/vk2dfd.c",
|
||||
]
|
||||
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
||||
|
||||
env_ktx.Prepend(CPPEXTPATH=[thirdparty_dir + "include"])
|
||||
env_ktx.Prepend(CPPEXTPATH=[thirdparty_dir + "utils"])
|
||||
env_ktx.Prepend(CPPEXTPATH=[thirdparty_dir + "lib"])
|
||||
env_ktx.Prepend(CPPEXTPATH=[thirdparty_dir + "other_include"])
|
||||
env_ktx.Prepend(CPPEXTPATH=[thirdparty_dir + "external"])
|
||||
|
||||
env_ktx.Prepend(CPPEXTPATH=["#thirdparty/basis_universal"])
|
||||
if env.editor_build:
|
||||
# We already build miniz in the basis_universal module (editor only).
|
||||
env_ktx.Append(CPPDEFINES=["MINIZ_HEADER_FILE_ONLY"])
|
||||
|
||||
if env["vulkan"]:
|
||||
env_ktx.Prepend(CPPEXTPATH=["#thirdparty/vulkan/include"])
|
||||
else:
|
||||
# Falls back on bundled `vkformat_enum.h`.
|
||||
env_ktx.Append(CPPDEFINES=["LIBKTX"])
|
||||
|
||||
env_ktx.Append(CPPDEFINES=[("KHRONOS_STATIC", 1)])
|
||||
|
||||
env_thirdparty = env_ktx.Clone()
|
||||
env_thirdparty.disable_warnings()
|
||||
env_thirdparty.add_source_files(thirdparty_obj, thirdparty_sources)
|
||||
env.modules_sources += thirdparty_obj
|
||||
|
||||
# Godot source files
|
||||
module_obj = []
|
||||
|
||||
env_ktx.add_source_files(module_obj, "*.cpp")
|
||||
env.modules_sources += module_obj
|
||||
|
||||
# Needed to force rebuilding the module files when the thirdparty library is updated.
|
||||
env.Depends(module_obj, thirdparty_obj)
|
Reference in New Issue
Block a user