[
    {
        "name": "hunspell",
        "sources": "calibre/utils/spell/hunspell_wrapper.cpp",
        "inc_dirs": "!hunspell_inc_dirs",
        "lib_dirs": "!hunspell_lib_dirs",
        "libraries": "hunspell-1.7",
        "windows_libraries": "libhunspell",
		"needs_c++": "11"
    },
    {
        "name": "hyphen",
        "sources": "calibre/utils/hyphenation/hyphen.c",
		"libraries": "hyphen",
        "inc_dirs": "!hyphen_inc_dirs",
        "lib_dirs": "!hyphen_lib_dirs",
		"needs_c": "99"
    },
    {
        "name": "uchardet",
        "sources": "calibre/ebooks/uchardet.c",
        "libraries": "!uchardet_libs",
        "inc_dirs": "!uchardet_inc_dirs",
        "lib_dirs": "!uchardet_lib_dirs"
    },
    {
        "name": "unicode_names",
        "headers": "unicode_names/names.h unicode_names/data-types.h",
        "sources": "unicode_names/unicode_names.c",
        "needs_c": "99"
    },
    {
        "name": "speedup",
        "sources": "calibre/utils/speedup.c",
        "libraries": "m",
        "windows_libraries": ""
    },
    {
        "name": "certgen",
        "sources": "calibre/utils/certgen.c",
        "libraries": "crypto",
        "windows_libraries": "libcrypto",
        "inc_dirs": "!openssl_inc_dirs",
        "lib_dirs": "!openssl_lib_dirs"
    },
    {
        "name": "html_syntax_highlighter",
        "sources": "calibre/gui2/tweak_book/editor/syntax/html.c"
    },
    {
        "name": "tokenizer",
        "sources": "tinycss/tokenizer.c"
    },
    {
        "name": "_patiencediff_c",
        "sources": "calibre/gui2/tweak_book/diff/_patiencediff_c.c"
    },
    {
        "name": "icu",
        "sources": "calibre/utils/icu.c",
        "headers": "calibre/utils/icu_calibre_utils.h",
        "libraries": "icudata icui18n icuuc icuio",
        "windows_libraries": "icudt icuin icuuc icuio",
        "lib_dirs": "!icu_lib_dirs",
        "inc_dirs": "!icu_inc_dirs"
    },
    {
        "name": "matcher",
        "sources": "calibre/utils/matcher.c",
        "headers": "calibre/utils/icu_calibre_utils.h",
        "libraries": "icudata icui18n icuuc icuio",
        "windows_libraries": "icudt icuin icuuc icuio",
        "lib_dirs": "!icu_lib_dirs",
        "inc_dirs": "!icu_inc_dirs"
    },
    {
        "name": "sqlite_custom",
        "sources": "calibre/library/sqlite_custom.c",
        "inc_dirs": "!sqlite_inc_dirs"
    },
    {
        "name": "sqlite_extension",
        "headers": "calibre/utils/cpp_binding.h",
        "sources": "calibre/db/sqlite_extension.cpp",
		"needs_c++": "14",
        "libraries": "icudata icui18n icuuc icuio stemmer",
        "windows_libraries": "icudt icuin icuuc icuio libstemmer",
        "lib_dirs": "!icu_lib_dirs",
        "inc_dirs": "!icu_inc_dirs !sqlite_inc_dirs"
    },
    {
        "name": "lzx",
        "sources": "calibre/utils/lzx/lzxmodule.c calibre/utils/lzx/compressor.c calibre/utils/lzx/lzxd.c calibre/utils/lzx/lzc.c calibre/utils/lzx/lzxc.c",
        "inc_dirs": "calibre/utils/lzx",
        "headers": "calibre/utils/lzx/lzc.h calibre/utils/lzx/system.h calibre/utils/lzx/lzxc.h calibre/utils/lzx/lzxd.h calibre/utils/lzx/mspack.h"
    },
    {
        "name": "freetype",
        "sources": "calibre/utils/fonts/freetype.cpp",
        "libraries": "!freetype_libs",
        "inc_dirs": "!freetype_inc_dirs",
        "lib_dirs": "!freetype_lib_dirs"
    },
    {
        "name": "msdes",
        "sources": "calibre/utils/msdes/msdesmodule.c calibre/utils/msdes/des.c",
        "headers": "calibre/utils/msdes/spr.h calibre/utils/msdes/d3des.h",
        "inc_dirs": "calibre/utils/msdes"
    },
    {
        "name": "cPalmdoc",
        "sources": "calibre/ebooks/compression/palmdoc.c"
    },
    {
        "name": "bzzdec",
        "sources": "calibre/ebooks/djvu/bzzdecoder.c",
        "windows_inc_dirs": "calibre/utils/chm"
    },
    {
        "name": "podofo",
        "sources": "calibre/utils/podofo/utils.cpp calibre/utils/podofo/output.cpp calibre/utils/podofo/doc.cpp calibre/utils/podofo/outline.cpp calibre/utils/podofo/fonts.cpp calibre/utils/podofo/impose.cpp calibre/utils/podofo/images.cpp calibre/utils/podofo/outlines.cpp calibre/utils/podofo/podofo.cpp",
        "headers": "calibre/utils/podofo/global.h",
        "libraries": "!podofo",
        "lib_dirs": "!podofo_lib_dirs",
        "inc_dirs": "!podofo_inc_dirs",
        "error": "!podofo_error",
		"needs_c++": "17"
    },
    {
        "name": "html_as_json",
        "sources": "calibre/srv/html_as_json.cpp",
		"needs_c++": "11"
    },
    {
        "name": "fast_css_transform",
        "headers": "calibre/utils/cpp_binding.h calibre/utils/stb_sprintf.h",
        "sources": "calibre/srv/fast_css_transform.cpp",
		"inc_dirs": "perfect-hashing",
		"needs_c++": "14"
    },
    {
        "name": "rcc_backend",
        "sources": "calibre/utils/rcc/rcc.cpp",
        "headers": "calibre/utils/rcc/rcc.h",
        "sip_files": "calibre/utils/rcc/rcc.sip",
        "inc_dirs": "calibre/utils/rcc",
		"qt_modules": ["-gui"]
    },
    {
        "name": "pictureflow",
        "sources": "calibre/gui2/pictureflow/pictureflow.cpp",
        "headers": "calibre/gui2/pictureflow/pictureflow.h",
        "sip_files": "calibre/gui2/pictureflow/pictureflow.sip",
        "inc_dirs": "calibre/gui2/pictureflow"
    },
    {
        "name": "progress_indicator",
        "sources": "calibre/gui2/progress_indicator/QProgressIndicator.cpp calibre/gui2/progress_indicator/CalibreStyle.cpp",
        "headers": "calibre/gui2/progress_indicator/QProgressIndicator.h",
        "sip_files": "calibre/gui2/progress_indicator/QProgressIndicator.sip",
        "inc_dirs": "calibre/gui2/progress_indicator"
    },
    {
        "name": "imageops",
        "sources": "calibre/utils/imageops/imageops.cpp calibre/utils/imageops/quantize.cpp calibre/utils/imageops/ordered_dither.cpp",
        "headers": "calibre/utils/imageops/imageops.h",
        "sip_files": "calibre/utils/imageops/imageops.sip",
		"needs_exceptions": true,
        "inc_dirs": "calibre/utils/imageops"
    },
    {
        "name": "winutil",
        "only": "windows",
        "headers": "calibre/utils/cpp_binding.h calibre/utils/windows/common.h",
        "sources": "calibre/utils/windows/winutil.cpp",
        "libraries": "shell32 wininet advapi32 gdi32 rstrtmgr",
        "cflags": "/X"
    },
    {
        "name": "winsapi",
        "only": "windows",
        "headers": "calibre/utils/cpp_binding.h calibre/utils/windows/common.h",
        "sources": "calibre/utils/windows/winsapi.cpp",
        "libraries": "SAPI Ole32",
        "cflags": "/X"
    },
    {
        "name": "winspeech",
        "only": "windows",
        "headers": "calibre/utils/cpp_binding.h calibre/utils/windows/common.h",
        "sources": "calibre/utils/windows/winspeech.cpp",
        "libraries": "WindowsApp",
		"needs_c++": "20",
        "cflags": "/X /Zc:__cplusplus /bigobj /permissive- /WX /Zc:twoPhase-"
    },
    {
        "name": "wpd",
        "only": "windows",
        "sources": "calibre/devices/mtp/windows/device_enumeration.cpp calibre/devices/mtp/windows/content_enumeration.cpp calibre/devices/mtp/windows/device.cpp calibre/devices/mtp/windows/wpd.cpp",
        "headers": "calibre/utils/cpp_binding.h calibre/devices/mtp/windows/global.h calibre/utils/windows/common.h",
        "libraries": "ole32 oleaut32 portabledeviceguids user32",
        "cflags": "/X"
    },
    {
        "name": "winfonts",
        "only": "windows",
        "sources": "calibre/utils/fonts/winfonts.cpp",
        "libraries": "Gdi32 User32",
        "cflags": "/X"
    },
    {
        "name": "usbobserver",
        "only": "macos",
        "sources": "calibre/devices/usbobserver/usbobserver.c",
        "ldflags": "-framework CoreServices -framework IOKit"
    },
    {
        "name": "cocoa",
        "only": "macos",
        "sources": "calibre/utils/cocoa.m calibre/gui2/tts/nsss.m",
        "ldflags": "-framework Cocoa -framework UserNotifications"
    },
    {
        "name": "libusb",
        "only": "macos linux haiku freebsd",
        "sources": "calibre/devices/libusb/libusb.c",
        "libraries": "!usb_library"
    },
    {
        "name": "libmtp",
        "only": "freebsd macos linux haiku",
        "sources": "calibre/devices/mtp/unix/devices.c calibre/devices/mtp/unix/libmtp.c",
        "headers": "calibre/devices/mtp/unix/devices.h calibre/devices/mtp/unix/upstream/music-players.h calibre/devices/mtp/unix/upstream/device-flags.h",
        "libraries": "mtp"
    }
]
