2016-10-27 22:51:59 +00:00
|
|
|
|
|
|
|
add_definitions(
|
2017-01-11 11:56:36 +00:00
|
|
|
-DDUPLICATES_ONCE
|
2019-01-06 16:31:43 +00:00
|
|
|
-DINS_BASE="\\\".\\\""
|
2016-10-27 22:51:59 +00:00
|
|
|
-DSCHILY_BUILD
|
|
|
|
-DSORTING)
|
|
|
|
|
|
|
|
include_directories(
|
|
|
|
schilytools/include
|
|
|
|
reactos
|
|
|
|
${REACTOS_BINARY_DIR}/sdk/include)
|
|
|
|
|
|
|
|
# libschily and libsiconv are licensed under CDDL whereas mkisofs is licensed under GPL.
|
|
|
|
# As such, we cannot mix the library sources with mkisofs sources and have to build them seperately.
|
|
|
|
# Later on, they may still be linked together though.
|
|
|
|
#
|
|
|
|
# Reference: http://opensource.stackexchange.com/questions/2094
|
|
|
|
|
2017-01-11 11:56:36 +00:00
|
|
|
add_library(libmdigest
|
|
|
|
schilytools/libmdigest/sha3.c)
|
|
|
|
|
2016-10-27 22:51:59 +00:00
|
|
|
add_library(libschily
|
|
|
|
schilytools/libschily/stdio/cvmod.c
|
|
|
|
schilytools/libschily/stdio/dat.c
|
|
|
|
schilytools/libschily/stdio/fcons.c
|
|
|
|
schilytools/libschily/stdio/ffileread.c
|
|
|
|
schilytools/libschily/stdio/fgetline.c
|
|
|
|
schilytools/libschily/stdio/fileopen.c
|
|
|
|
schilytools/libschily/stdio/filewrite.c
|
|
|
|
schilytools/libschily/stdio/flag.c
|
|
|
|
schilytools/libschily/stdio/niwrite.c
|
|
|
|
schilytools/libschily/astoll.c
|
|
|
|
schilytools/libschily/checkerr.c
|
|
|
|
schilytools/libschily/comerr.c
|
|
|
|
schilytools/libschily/dirent.c
|
|
|
|
schilytools/libschily/eaccess.c
|
|
|
|
schilytools/libschily/error.c
|
|
|
|
schilytools/libschily/fconv.c
|
|
|
|
schilytools/libschily/fillbytes.c
|
|
|
|
schilytools/libschily/fnmatch.c
|
|
|
|
schilytools/libschily/format.c
|
|
|
|
schilytools/libschily/getargs.c
|
|
|
|
schilytools/libschily/geterrno.c
|
|
|
|
schilytools/libschily/getexecpath.c
|
|
|
|
schilytools/libschily/gettimeofday.c
|
|
|
|
schilytools/libschily/gid.c
|
|
|
|
schilytools/libschily/jsprintf.c
|
|
|
|
schilytools/libschily/jssnprintf.c
|
|
|
|
schilytools/libschily/match.c
|
|
|
|
schilytools/libschily/mem.c
|
|
|
|
schilytools/libschily/movebytes.c
|
|
|
|
schilytools/libschily/raisecond.c
|
|
|
|
schilytools/libschily/saveargs.c
|
|
|
|
schilytools/libschily/searchinpath.c
|
|
|
|
schilytools/libschily/seterrno.c
|
|
|
|
schilytools/libschily/streql.c
|
|
|
|
schilytools/libschily/strlcat.c
|
|
|
|
schilytools/libschily/strlcpy.c
|
|
|
|
schilytools/libschily/uid.c
|
|
|
|
schilytools/libschily/zerobytes.c)
|
|
|
|
|
|
|
|
add_library(libsiconv
|
|
|
|
schilytools/libsiconv/sic_nls.c)
|
|
|
|
target_link_libraries(libsiconv libschily)
|
|
|
|
|
|
|
|
add_host_tool(mkisofs
|
|
|
|
schilytools/mkisofs/boot.c
|
|
|
|
schilytools/mkisofs/eltorito.c
|
|
|
|
schilytools/mkisofs/hash.c
|
|
|
|
schilytools/mkisofs/inode.c
|
|
|
|
schilytools/mkisofs/isonum.c
|
|
|
|
schilytools/mkisofs/joliet.c
|
|
|
|
schilytools/mkisofs/match.c
|
|
|
|
schilytools/mkisofs/mkisofs.c
|
|
|
|
schilytools/mkisofs/multi.c
|
|
|
|
schilytools/mkisofs/name.c
|
|
|
|
schilytools/mkisofs/rock.c
|
|
|
|
schilytools/mkisofs/stream.c
|
|
|
|
schilytools/mkisofs/tree.c
|
|
|
|
schilytools/mkisofs/write.c)
|
2017-01-11 11:56:36 +00:00
|
|
|
target_link_libraries(mkisofs libmdigest libschily libsiconv)
|
2016-10-27 22:51:59 +00:00
|
|
|
|
|
|
|
if(MSVC)
|
|
|
|
# mkisofs uses K&R-style function definitions to support very old compilers.
|
|
|
|
# MSVC complains about the resulting foo() vs. foo(void) mismatches.
|
2020-04-16 12:59:38 +00:00
|
|
|
target_compile_options(mkisofs PRIVATE "/wd4113")
|
2019-01-06 16:31:43 +00:00
|
|
|
|
2020-05-26 18:24:02 +00:00
|
|
|
if(ARCH STREQUAL "amd64")
|
2019-01-06 16:31:43 +00:00
|
|
|
# Disable warning "conversion from 'size_t' to 'int', possible loss of data"
|
2020-04-16 12:59:38 +00:00
|
|
|
target_compile_options(mkisofs PRIVATE "/wd4267")
|
2019-04-15 11:29:33 +00:00
|
|
|
|
|
|
|
# Disable warning "'type cast': pointer truncation from 'const char *' to 'long'"
|
2020-04-16 12:59:38 +00:00
|
|
|
target_compile_options(libschily PRIVATE "/wd4311")
|
2019-01-06 16:31:43 +00:00
|
|
|
endif()
|
2019-04-15 11:29:33 +00:00
|
|
|
|
|
|
|
# Disable warning "'<': signed/unsigned mismatch"
|
2020-04-16 12:59:38 +00:00
|
|
|
target_compile_options(mkisofs PRIVATE "/wd4018")
|
2019-04-15 11:29:33 +00:00
|
|
|
|
|
|
|
# Disable warning "'nchar': unreferenced local variable"
|
2020-04-16 12:59:38 +00:00
|
|
|
target_compile_options(mkisofs PRIVATE "/wd4101")
|
2019-04-15 11:29:33 +00:00
|
|
|
|
|
|
|
# Disable warning "'+=': conversion from 'x' to 'y', possible loss of data"
|
2020-04-16 12:59:38 +00:00
|
|
|
target_compile_options(libschily PRIVATE "/wd4244")
|
|
|
|
target_compile_options(mkisofs PRIVATE "/wd4244")
|
2016-10-27 22:51:59 +00:00
|
|
|
else()
|
|
|
|
# libschily implements an own printf function with support for the %r formatter.
|
|
|
|
# Silence compilers checking for invalid formatting sequences.
|
2020-04-16 12:59:38 +00:00
|
|
|
target_compile_options(libschily PRIVATE "-Wno-format")
|
2023-08-23 12:37:15 +00:00
|
|
|
|
2024-01-17 15:32:46 +00:00
|
|
|
if(CMAKE_C_COMPILER_ID STREQUAL "Clang" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL "15")
|
|
|
|
# mkisofs uses K&R-style function definitions to support very old compilers.
|
|
|
|
# This causes warnings with modern compilers.
|
|
|
|
target_compile_options(libmdigest PRIVATE "-Wno-deprecated-non-prototype")
|
|
|
|
target_compile_options(libschily PRIVATE "-Wno-deprecated-non-prototype")
|
|
|
|
target_compile_options(libsiconv PRIVATE "-Wno-deprecated-non-prototype")
|
|
|
|
target_compile_options(mkisofs PRIVATE "-Wno-deprecated-non-prototype")
|
|
|
|
endif()
|
2016-10-27 22:51:59 +00:00
|
|
|
endif()
|