You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

libtiff.cmake 1.6 kB

12345678910111213141516171819202122232425262728293031323334
  1. if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
  2. set(tiff_CXXFLAGS "-fstack-protector-all -Wno-uninitialized -Wno-unused-parameter -Wno-unused-result \
  3. -Wno-unused-but-set-variable -fPIC -D_FORTIFY_SOURCE=2 -O2")
  4. set(tiff_CFLAGS "-fstack-protector-all -Wno-uninitialized -Wno-unused-parameter -Wno-unused-result \
  5. -Wno-unused-but-set-variable -fPIC -D_FORTIFY_SOURCE=2 -O2")
  6. else()
  7. set(tiff_CXXFLAGS "-fstack-protector-all -Wno-maybe-uninitialized -Wno-unused-parameter -Wno-unused-result \
  8. -Wno-unused-but-set-variable -fPIC -D_FORTIFY_SOURCE=2 -O2")
  9. set(tiff_CFLAGS "-fstack-protector-all -Wno-maybe-uninitialized -Wno-unused-parameter -Wno-unused-result \
  10. -Wno-unused-but-set-variable -fPIC -D_FORTIFY_SOURCE=2 -O2")
  11. if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
  12. set(tiff_CFLAGS "${tiff_CFLAGS} -Wno-int-to-pointer-cast -Wno-implicit-fallthrough -Wno-pointer-to-int-cast")
  13. endif()
  14. endif()
  15. set(tiff_LDFLAGS "-Wl,-z,relro,-z,now,-z,noexecstack")
  16. if(ENABLE_GITEE)
  17. set(REQ_URL "https://gitee.com/mirrors/libtiff/repository/archive/v4.1.0.tar.gz")
  18. set(MD5 "76b951159c8bdf47dba4803659c232d1")
  19. else()
  20. set(REQ_URL "https://gitlab.com/libtiff/libtiff/-/archive/v4.1.0/libtiff-v4.1.0.tar.gz")
  21. set(MD5 "21de8d35c1b21ac82663fa9f56d3350d")
  22. endif()
  23. mindspore_add_pkg(tiff
  24. VER 4.1.0
  25. LIBS tiff
  26. URL ${REQ_URL}
  27. MD5 ${MD5}
  28. CMAKE_OPTION -DCMAKE_BUILD_TYPE=Release -Djbig=OFF -Dlzma=OFF -Djpeg12=OFF -Dzstd=OFF -Dpixarlog=OFF
  29. -Dold-jpeg=OFF -Dwebp=OFF -DBUILD_SHARED_LIBS=OFF)
  30. message("tiff include = ${tiff_INC}")
  31. message("tiff lib = ${tiff_LIB}")