mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
modules: Clone env in each module
This allows to pass include paths and flags only to a given thirdparty
library, thus preventing conflicts between their files (e.g. between
opus and openssl which both provide modes.h.
This also has the nice effect of making the compilation command smaller
for each module as it no longer related to all other modules, only the
final linking brings them together.
This however requires adding manually the ogg include path in opus
and vorbis when building against the builtin ogg, since it is no longer
in the global env.
Also simplified template 'thirdparty_<module>_sources' to
'thirdparty_sources'.
"Core" modules like cscript, gdscript, gridmap, ik and virtual_script
still use the main env_modules, but it could be changed if need be.
(cherry picked from commit da09c6131b)
Obviously removed the parts about enet and visual_script.
This commit is contained in:
parent
4cd640f684
commit
bfea3f1d9a
15 changed files with 85 additions and 83 deletions
|
|
@ -1,23 +1,22 @@
|
|||
Import('env')
|
||||
Import('env_modules')
|
||||
|
||||
env_pvr = env_modules.Clone()
|
||||
|
||||
# Thirdparty source files
|
||||
# Not unbundled so far since not widespread as shared library
|
||||
thirdparty_dir = "#thirdparty/pvrtccompressor/"
|
||||
thirdparty_pvr_sources = [
|
||||
thirdparty_sources = [
|
||||
"BitScale.cpp",
|
||||
"MortonTable.cpp",
|
||||
"PvrTcDecoder.cpp",
|
||||
"PvrTcEncoder.cpp",
|
||||
"PvrTcPacket.cpp",
|
||||
]
|
||||
thirdparty_pvr_sources = [thirdparty_dir + file for file in thirdparty_pvr_sources]
|
||||
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
||||
|
||||
env_modules.add_source_files(env.modules_sources, thirdparty_pvr_sources)
|
||||
env_modules.Append(CPPPATH = [thirdparty_dir])
|
||||
env_pvr.add_source_files(env.modules_sources, thirdparty_sources)
|
||||
env_pvr.Append(CPPPATH = [thirdparty_dir])
|
||||
|
||||
# Godot source files
|
||||
env_modules.add_source_files(env.modules_sources, "*.cpp")
|
||||
|
||||
Export('env_modules')
|
||||
Export('env')
|
||||
env_pvr.add_source_files(env.modules_sources, "*.cpp")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue