• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1if(${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")
6else()
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()
14endif()
15
16set(tiff_LDFLAGS "-Wl,-z,relro,-z,now,-z,noexecstack")
17
18if(ENABLE_GITEE)
19    set(REQ_URL "https://gitee.com/mirrors/libtiff/repository/archive/v4.2.0.tar.gz")
20    set(MD5 "92ca290a13115e80f94528506c66af16")
21else()
22    set(REQ_URL "http://download.osgeo.org/libtiff/tiff-4.2.0.tar.gz")
23    set(MD5 "2bbf6db1ddc4a59c89d6986b368fc063")
24endif()
25
26mindspore_add_pkg(tiff
27        VER 4.2.0
28        LIBS tiff
29        URL ${REQ_URL}
30        MD5 ${MD5}
31        CMAKE_OPTION -DCMAKE_BUILD_TYPE=Release -Djbig=OFF -Dlzma=OFF -Djpeg12=OFF -Dzstd=OFF -Dpixarlog=OFF
32        -Dold-jpeg=OFF -Dwebp=OFF -DBUILD_SHARED_LIBS=OFF -Dlibdeflate=OFF)
33message("tiff include = ${tiff_INC}")
34message("tiff lib = ${tiff_LIB}")
35