actions.py 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3. #
  4. # Licensed under the GNU General Public License, version 3.
  5. # See the file http://www.gnu.org/licenses/gpl.txt
  6. from pisi.actionsapi import cmaketools
  7. from pisi.actionsapi import autotools
  8. from pisi.actionsapi import shelltools
  9. from pisi.actionsapi import pisitools
  10. from pisi.actionsapi import get
  11. pisitools.cxxflags.add("-std=gnu++11")
  12. def setup():
  13. if get.buildTYPE() == "emul32":
  14. cmaketools.configure("-DCMAKE_INSTALL_LIBDIR=lib32 \
  15. -DBUILD_SHARED_LIBS=ON \
  16. -DALLOW_EXTERNAL_SPIRV_TOOLS=ON \
  17. -DENABLE_GLSLANG_BINARIES=OFF")
  18. else:
  19. cmaketools.configure("-DCMAKE_INSTALL_LIBDIR=lib \
  20. -DALLOW_EXTERNAL_SPIRV_TOOLS=ON \
  21. -DBUILD_SHARED_LIBS=ON")
  22. def build():
  23. cmaketools.make()
  24. def install():
  25. autotools.rawInstall("DESTDIR=%s" %get.installDIR())
  26. #for tool in ["glslangValidator", "spirv-remap"]:
  27. #pisitools.domove("/usr/bin32/%s" %tool, "/usr/bin", "%s-32" %tool)
  28. #pisitools.dodoc("README.md", "COPYRIGHT.txt", "LICENSE.txt")