__init__.py 902 B

12345678910111213141516171819202122232425262728293031323334353637
  1. from devtools.yamaker.modules import Linkable, Switch
  2. from devtools.yamaker.project import CMakeNinjaNixProject
  3. def post_install(self):
  4. m = self.yamakes["."]
  5. # Support Windows (if it is configured).
  6. m.SRCS.remove("tif_unix.c")
  7. m.after(
  8. "SRCS",
  9. Switch(
  10. OS_WINDOWS=Linkable(SRCS=["tif_win32.c"]),
  11. default=Linkable(SRCS=["tif_unix.c"]),
  12. ),
  13. )
  14. libtiff = CMakeNinjaNixProject(
  15. owners=["g:images", "fedorenko"],
  16. arcdir="contrib/libs/libtiff",
  17. nixattr="libtiff",
  18. build_targets=["tiff", "tiffxx"],
  19. disable_includes=[
  20. "jbig.h",
  21. "libdeflate.h",
  22. "Lerc_c_api.h",
  23. "LIBJPEG_12_PATH",
  24. ],
  25. install_subdir="libtiff",
  26. put_with={"tiff": {"tiffxx"}},
  27. copy_sources=[
  28. "tif_win32.c",
  29. "tiffio.hxx",
  30. ],
  31. addincl_global={".": {"."}},
  32. post_install=post_install,
  33. )