actions.py 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. #shelltools.system("mv SPIRV-Headers-1.5.4.raytracing.fixed external/SPIRV-Headers")
  14. if get.buildTYPE() == "emul32":
  15. cmaketools.configure("-DCMAKE_INSTALL_LIBDIR=lib32 \
  16. -DBUILD_SHARED_LIBS=ON \
  17. -DSPIRV_TOOLS_BUILD_STATIC=OFF \
  18. -DSPIRV_WERROR=Off \
  19. -DSPIRV-Headers_SOURCE_DIR=/usr \
  20. -DSKIP_SPIRV_TOOLS_INSTALL=OFF \
  21. -DCMAKE_INSTALL_BINDIR=bin32")
  22. else:
  23. cmaketools.configure("-DCMAKE_INSTALL_LIBDIR=lib \
  24. -DCMAKE_BUILD_TYPE=Release \
  25. -DBUILD_SHARED_LIBS=ON \
  26. -DSPIRV_TOOLS_BUILD_STATIC=OFF \
  27. -DSPIRV-Headers_SOURCE_DIR=/usr \
  28. -DSPIRV_WERROR=OFF")
  29. def build():
  30. cmaketools.make()
  31. def install():
  32. autotools.rawInstall("DESTDIR=%s" %get.installDIR())
  33. if get.buildTYPE() == "emul32":
  34. pisitools.removeDir("/usr/bin32")
  35. pisitools.dodoc("LICENSE", "README.md", "CONTRIBUTING.md")