[MKISOFS]
[reactos.git] / reactos / sdk / tools / mkisofs / CMakeLists.txt
1
2 add_definitions(
3 -DINS_BASE="\\".\\""
4 -DSCHILY_BUILD
5 -DSORTING)
6
7 include_directories(
8 schilytools/include
9 reactos
10 ${REACTOS_BINARY_DIR}/sdk/include)
11
12 # libschily and libsiconv are licensed under CDDL whereas mkisofs is licensed under GPL.
13 # As such, we cannot mix the library sources with mkisofs sources and have to build them seperately.
14 # Later on, they may still be linked together though.
15 #
16 # Reference: http://opensource.stackexchange.com/questions/2094
17
18 add_library(libschily
19 schilytools/libschily/stdio/cvmod.c
20 schilytools/libschily/stdio/dat.c
21 schilytools/libschily/stdio/fcons.c
22 schilytools/libschily/stdio/ffileread.c
23 schilytools/libschily/stdio/fgetline.c
24 schilytools/libschily/stdio/fileopen.c
25 schilytools/libschily/stdio/filewrite.c
26 schilytools/libschily/stdio/flag.c
27 schilytools/libschily/stdio/niwrite.c
28 schilytools/libschily/astoll.c
29 schilytools/libschily/checkerr.c
30 schilytools/libschily/comerr.c
31 schilytools/libschily/dirent.c
32 schilytools/libschily/eaccess.c
33 schilytools/libschily/error.c
34 schilytools/libschily/fconv.c
35 schilytools/libschily/fillbytes.c
36 schilytools/libschily/fnmatch.c
37 schilytools/libschily/format.c
38 schilytools/libschily/getargs.c
39 schilytools/libschily/geterrno.c
40 schilytools/libschily/getexecpath.c
41 schilytools/libschily/gettimeofday.c
42 schilytools/libschily/gid.c
43 schilytools/libschily/jsprintf.c
44 schilytools/libschily/jssnprintf.c
45 schilytools/libschily/match.c
46 schilytools/libschily/mem.c
47 schilytools/libschily/movebytes.c
48 schilytools/libschily/raisecond.c
49 schilytools/libschily/saveargs.c
50 schilytools/libschily/searchinpath.c
51 schilytools/libschily/seterrno.c
52 schilytools/libschily/streql.c
53 schilytools/libschily/strlcat.c
54 schilytools/libschily/strlcpy.c
55 schilytools/libschily/uid.c
56 schilytools/libschily/zerobytes.c)
57
58 add_library(libsiconv
59 schilytools/libsiconv/sic_nls.c)
60 target_link_libraries(libsiconv libschily)
61
62 add_host_tool(mkisofs
63 schilytools/mkisofs/boot.c
64 schilytools/mkisofs/eltorito.c
65 schilytools/mkisofs/hash.c
66 schilytools/mkisofs/inode.c
67 schilytools/mkisofs/isonum.c
68 schilytools/mkisofs/joliet.c
69 schilytools/mkisofs/match.c
70 schilytools/mkisofs/mkisofs.c
71 schilytools/mkisofs/multi.c
72 schilytools/mkisofs/name.c
73 schilytools/mkisofs/rock.c
74 schilytools/mkisofs/stream.c
75 schilytools/mkisofs/tree.c
76 schilytools/mkisofs/write.c)
77 target_link_libraries(mkisofs libschily libsiconv)
78
79 if(MSVC)
80 # mkisofs uses K&R-style function definitions to support very old compilers.
81 # MSVC complains about the resulting foo() vs. foo(void) mismatches.
82 add_target_compile_flags(mkisofs "/wd4113")
83 else()
84 # libschily implements an own printf function with support for the %r formatter.
85 # Silence compilers checking for invalid formatting sequences.
86 add_target_compile_flags(libschily "-Wno-format")
87 endif()