-
Notifications
You must be signed in to change notification settings - Fork 217
/
xmake.lua
40 lines (38 loc) · 1.28 KB
/
xmake.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
-- originally from https://github.com/xmake-io/xmake-repo/pull/1709
option("libtiff", {description = "Enable libtiff", default = false})
option("libpng", {description = "Enable libpng", default = false})
option("libjpeg", {description = "Enable libjpeg", default = false})
add_rules("mode.debug", "mode.release")
if has_config("libtiff") then
add_requires("libtiff")
end
if has_config("libpng") then
add_requires("libpng")
end
if has_config("libjpeg") then
add_requires("libjpeg")
end
add_requires("freetype", "zlib", "libaesgm")
target("pdfhummus")
set_kind("$(kind)")
add_files("PDFWriter/*.cpp")
add_headerfiles("(PDFWriter/*.h)")
add_packages("freetype")
add_packages("libtiff", "libpng", "libjpeg")
add_packages("libaesgm", "zlib")
if has_package("libtiff") then
add_defines("_INCLUDE_TIFF_HEADER")
add_cxflags("-Wno-deprecated-declarations")
else
add_defines("PDFHUMMUS_NO_TIFF=1")
end
if not has_package("libpng") then
add_defines("PDFHUMMUS_NO_PNG=1")
end
if not has_package("libjpeg") then
add_defines("PDFHUMMUS_NO_DCT=1")
end
-- port symbols for linker
if is_plat("windows") and is_kind("shared") then
add_rules("utils.symbols.export_all", {export_classes = true})
end