xref: /reactos/dll/3rdparty/libtiff/CMakeLists.txt (revision 9393fc32)
1
2add_definitions(
3    -DWIN32
4    -DNDEBUG
5    -DUSE_WIN32_FILEIO
6    -DTIF_PLATFORM_CONSOLE)
7
8include_directories(
9    ${REACTOS_SOURCE_DIR}/sdk/include/reactos/libs/libtiff
10    ${REACTOS_SOURCE_DIR}/sdk/include/reactos/libs/zlib)
11
12list(APPEND SOURCE
13    #mkg3states.c
14    tif_aux.c
15    tif_close.c
16    tif_codec.c
17    tif_color.c
18    tif_compress.c
19    tif_dir.c
20    tif_dirinfo.c
21    tif_dirread.c
22    tif_dirwrite.c
23    tif_dumpmode.c
24    tif_error.c
25    tif_extension.c
26    tif_fax3.c
27    tif_fax3sm.c
28    tif_flush.c
29    tif_getimage.c
30    #tif_jbig.c
31    #tif_jpeg.c
32    tif_luv.c
33    #tif_lzma.c
34    tif_lzw.c
35    tif_next.c
36    #tif_ojpeg.c
37    tif_open.c
38    tif_packbits.c
39    tif_pixarlog.c
40    tif_predict.c
41    tif_print.c
42    tif_read.c
43    #tif_stream.cxx
44    tif_strip.c
45    tif_swab.c
46    tif_thunder.c
47    tif_tile.c
48    tif_version.c
49    tif_warning.c
50    #tif_webp.c
51    tif_win32.c
52    tif_write.c
53    tif_zip.c
54    #tif_zstd.c
55    precomp.h)
56
57add_library(libtiff MODULE ${SOURCE} libtiff.def)
58
59set_module_type(libtiff win32dll)
60target_link_libraries(libtiff zlib getopt)
61add_importlibs(libtiff user32 msvcrt kernel32 ntdll)
62add_pch(libtiff precomp.h SOURCE)
63add_cd_file(TARGET libtiff DESTINATION reactos/system32 FOR all)
64
65if(MSVC)
66    # error C4311: 'type cast': pointer truncation from 'thandle_t' to 'int'
67    remove_target_compile_option(libtiff "/we4311")
68    # error C4312: 'type cast': conversion from 'int' to 'thandle_t' of greater size
69    remove_target_compile_option(libtiff "/we4312")
70endif()
71
72if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
73    target_compile_options(libtiff PRIVATE -Wno-unused-but-set-variable)
74endif()
75