blob: 6c673d9cf5d5607892b2891ae457c2e6552ed821 (
plain)
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
|
# Setup GTK UI library...
target_include_directories(xtrkcad-wlib
PRIVATE
${xtrkcad-lib_SOURCE_DIR}
)
target_sources(xtrkcad-wlib
PRIVATE
bitmap.c
boxes.c
button.c
color.c
control.c
droplist.c
filesel.c
font.c
help.c
lines.c
list.c
liststore.c
main.c
menu.c
message.c
notice.c
opendocument.c
pixbuf.c
print.c
single.c
splash.c
statusbar.c
sysinfo.c
text.c
timer.c
tooltip.c
treeview.c
util.c
window.c
wpref.c
writebitmap.c
gtkdraw-cairo.c
)
# help system is OS and build specific, add appropriate source files
if(APPLE)
if (XTRKCAD_USE_APPLEHELP)
target_sources(xtrkcad-wlib
PRIVATE
osxhelp.c)
else()
if(XTRKCAD_USE_BROWSER)
target_sources(xtrkcad-wlib
PRIVATE
browserhelp.c)
else()
PKG_CHECK_MODULES(GTK_WEBKIT "webkit-1.0" REQUIRED)
target_sources(xtrkcad-wlib
PRIVATE
ixhelp.c)
endif()
endif()
else()
if(XTRKCAD_USE_BROWSER)
target_sources(xtrkcad-wlib
PRIVATE
browserhelp.c)
else()
PKG_CHECK_MODULES(GTK_WEBKIT "webkit-1.0" REQUIRED)
target_sources(xtrkcad-wlib
PRIVATE
ixhelp.c)
endif()
endif()
# GTK
find_package (GTK2)
# configure for GTK's native Unix print
find_package (GTKUnixPrint)
target_include_directories(xtrkcad-wlib
PRIVATE
${GTK_INCLUDE_DIRS}
${GTK_UNIX_PRINT_INCLUDE_DIRS}
)
target_link_libraries(xtrkcad-wlib
PRIVATE
dynstring
${GTK_UNIX_PRINT_LIBRARIES}
${GTK_LIBRARIES}
)
# add dependency to webkit if configured
if (APPLE)
if(NOT XTRKCAD_USE_APPLEHELP)
if(NOT XTRKCAD_USE_BROWSER)
target_include_directories(xtrkcad-wlib
${GTK_WEBKIT_INCLUDE_DIRS}
)
target_link_libraries(xtrkcad-wlib
PRIVATE
${GTK_WEBKIT_LIBRARIES}
)
endif()
endif()
else ()
if(NOT XTRKCAD_USE_BROWSER)
target_include_directories(xtrkcad-wlib
${GTK_WEBKIT_INCLUDE_DIRS}
)
target_link_libraries(xtrkcad-wlib
PRIVATE
${GTK_WEBKIT_LIBRARIES}
)
endif()
endif()
|