SConstruct 962 B

1234567891011121314151617181920212223242526272829303132
  1. #!/usr/bin/env python
  2. import os
  3. import sys
  4. env = SConscript("godot-cpp/SConstruct")
  5. # For reference:
  6. # - CCFLAGS are compilation flags shared between C and C++
  7. # - CFLAGS are for C-specific compilation flags
  8. # - CXXFLAGS are for C++-specific compilation flags
  9. # - CPPFLAGS are for pre-processor flags
  10. # - CPPDEFINES are for pre-processor defines
  11. # - LINKFLAGS are for linking flags
  12. # tweak this if you want to use different folders, or more folders, to store your source code in.
  13. env.Append(CPPPATH=["src/"])
  14. sources = Glob("src/*.cpp")
  15. if env["platform"] == "macos":
  16. library = env.SharedLibrary(
  17. "demo/bin/libgdexample.{}.{}.framework/libgdexample.{}.{}".format(
  18. env["platform"], env["target"], env["platform"], env["target"]
  19. ),
  20. source=sources,
  21. )
  22. else:
  23. library = env.SharedLibrary(
  24. "demo/bin/libgdexample{}{}".format(env["suffix"], env["SHLIBSUFFIX"]),
  25. source=sources,
  26. )
  27. Default(library)