-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
217 lines (200 loc) · 5.66 KB
/
CMakeLists.txt
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
Project(wex C CXX)
cmake_minimum_required(VERSION 3.7)
set(CMAKE_CXX_STANDARD 11)
set(LK_DIR CACHE PATH "LK root directory")
set(CURL_DIR CACHE PATH "Curl root directory")
find_package(wxWidgets REQUIRED net gl core base adv html xml)
include(${wxWidgets_USE_FILE})
if( UNIX AND NOT APPLE )
find_library(FONTCONFIG_LIBRARY NAMES fontconfig)
endif()
if( WIN32 )
find_package(OpenGL REQUIRED)
endif()
if( WIN32 )
include_directories(include src/freetype/include ${LK_DIR}/include ${CURL_DIR}/include)
add_definitions(-DLK_USE_WXWIDGETS -D_UNICODE -D_MBCS -D_CRT_SECURE_NO_DEPRECATE=1 -D_CRT_NON_CONFORMING_SWPRINTFS=1 -D_SCL_SECURE_NO_WARNINGS=1 -D__WXMSW__ -DNOPCH -DFT2_BUILD_LIBRARY -DOPJ_STATIC -DFT_CONFIG_MODULES_H=\"slimftmodules.h\" -DFT_CONFIG_OPTIONS_H=\"slimftoptions.h\")
else()
include_directories(include src/freetype/include ${LK_DIR}/include ${CURL_DIR}/include)
add_definitions(-DFT2_BUILD_LIBRARY -DOPJ_STATIC -DFT_CONFIG_MODULES_H=\"slimftmodules.h\" -DFT_CONFIG_OPTIONS_H=\"slimftoptions.h\")
endif()
set(WEX_SRC
src/clipper/clipper.cpp
src/codeedit.cpp
src/csv.cpp
src/dclatex.cpp
src/dview/dvautocolourassigner.cpp
src/dview/dvdcctrl.cpp
src/dview/dvdmapctrl.cpp
src/dview/dvfilereader.cpp
src/dview/dvplotctrl.cpp
src/dview/dvplotctrlsettings.cpp
src/dview/dvplothelper.cpp
src/dview/dvpncdfctrl.cpp
src/dview/dvprofilectrl.cpp
src/dview/dvscatterplotctrl.cpp
src/dview/dvselectionlist.cpp
src/dview/dvstatisticstablectrl.cpp
src/dview/dvtimeseriesctrl.cpp
src/dview/dvtimeseriesdataset.cpp
src/easycurl.cpp
src/extgrid.cpp
src/exttext.cpp
src/exttree.cpp
src/gleasy.cpp
src/jsonreader.cpp
src/jsonval.cpp
src/jsonwriter.cpp
src/label.cpp
src/lkscript.cpp
src/metro.cpp
src/mswfatal.cpp
src/pagelayout.cpp
src/pageobjects.cpp
src/plot/mplcontour.cpp
src/plot/plannotation.cpp
src/plot/plcontourplot.cpp
src/plot/ploutdev.cpp
src/plot/plplot.cpp
src/plot/plsectorplot.cpp
src/plot/pltext.cpp
src/plot/plwindrose.cpp
src/radiochoice.cpp
src/diurnal.cpp
src/numeric.cpp
src/pdf/pdfannotation.cpp
src/pdf/pdfbarcode.cpp
src/pdf/pdfcffdecoder.cpp
src/pdf/pdfcffindex.cpp
src/pdf/pdfcolour.cpp
src/pdf/pdfdc.cpp
src/pdf/pdfdecode.cpp
src/pdf/pdfdocument.cpp
src/pdf/pdfencoding.cpp
src/pdf/pdfencrypt.cpp
src/pdf/pdffont.cpp
src/pdf/pdffontdata.cpp
src/pdf/pdffontdatacore.cpp
src/pdf/pdffontdataopentype.cpp
src/pdf/pdffontdatatruetype.cpp
src/pdf/pdffontdatatype0.cpp
src/pdf/pdffontdatatype1.cpp
src/pdf/pdffontdescription.cpp
src/pdf/pdffontdetails.cpp
src/pdf/pdffontextended.cpp
src/pdf/pdffontmanager.cpp
src/pdf/pdffontparser.cpp
src/pdf/pdffontparsertruetype.cpp
src/pdf/pdffontparsertype1.cpp
src/pdf/pdffontsubsetcff.cpp
src/pdf/pdffontsubsettruetype.cpp
src/pdf/pdffontvolt.cpp
src/pdf/pdfform.cpp
src/pdf/pdfgradient.cpp
src/pdf/pdfgraphics.cpp
src/pdf/pdfimage.cpp
src/pdf/pdfkernel.cpp
src/pdf/pdflayer.cpp
src/pdf/pdfobjects.cpp
src/pdf/pdfocg.cpp
src/pdf/pdfparser.cpp
src/pdf/pdfpattern.cpp
src/pdf/pdfprint.cpp
src/pdf/pdfrijndael.cpp
src/pdf/pdftemplate.cpp
src/pdf/pdfutility.cpp
src/pdf/pdfxml.cpp
src/plot/plaxis.cpp
src/plot/plcolourmap.cpp
src/plot/plbarplot.cpp
src/plot/plhistplot.cpp
src/plot/pllineplot.cpp
src/plot/plplotctrl.cpp
src/plot/plscatterplot.cpp
src/registration.cpp
src/snaplay.cpp
src/tpdlg.cpp
src/uiform.cpp
src/utils.cpp
src/freetype/src/base/ftbase.c
src/freetype/src/base/ftbbox.c
src/freetype/src/base/ftbitmap.c
src/freetype/src/base/ftfntfmt.c
src/freetype/src/base/ftgasp.c
src/freetype/src/base/ftglyph.c
src/freetype/src/base/ftinit.c
src/freetype/src/base/ftstroke.c
src/freetype/src/base/ftsynth.c
src/freetype/src/base/ftsystem.c
src/freetype/src/base/fttype1.c
src/freetype/src/cff/cff.c
src/freetype/src/cid/type1cid.c
src/freetype/src/psaux/psaux.c
src/freetype/src/pshinter/pshinter.c
src/freetype/src/psnames/psnames.c
src/freetype/src/raster/raster.c
src/freetype/src/sfnt/sfnt.c
src/freetype/src/smooth/smooth.c
src/freetype/src/truetype/truetype.c
src/freetype/src/type1/type1.c
src/freetype/src/base/ftlcdfil.c
src/plot/qhull/geom.c
src/plot/qhull/geom2.c
src/plot/qhull/global.c
src/plot/qhull/io.c
src/plot/qhull/libqhull.c
src/plot/qhull/mem.c
src/plot/qhull/merge.c
src/plot/qhull/poly.c
src/plot/qhull/poly2.c
src/plot/qhull/qset.c
src/plot/qhull/random.c
src/plot/qhull/rboxlib.c
src/plot/qhull/stat.c
src/plot/qhull/user.c
src/plot/qhull/usermem.c
src/plot/qhull/userprintf.c
src/plot/qhull/userprintf_rbox.c
${LK_DIR}/src/sqlite3.c
)
if( WIN32 )
list(APPEND WEX_SRC
src/ole/activex.cpp
src/ole/excelauto.cpp
src/ole/iehtmlwin.cpp
)
endif()
add_library(wex STATIC ${WEX_SRC})
target_link_libraries(wex ${wxWidgets_LIBRARIES})
set(DVIEW_SRC
tools/dview/dview.cpp
)
set(MACOSX_BUNDLE_ICON_FILE DView.icns)
if( APPLE )
set(DVIEW_ICON build_osx/DView.icns)
set_source_files_properties(${DVIEW_ICON} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
set(APPS "\${CMAKE_INSTALL_PREFIX}/DView.app")
elseif( WIN32 )
set(DVIEW_ICON build_vs2013/dview.rc)
set(APPS "\${CMAKE_INSTALL_PREFIX}/DView.exe")
endif()
add_executable(DView
WIN32
MACOSX_BUNDLE
${DVIEW_SRC}
${DVIEW_ICON}
)
target_link_libraries(DView wex)
if( WIN32 )
target_link_libraries(DView Winhttp)
elseif( UNIX AND NOT APPLE )
target_link_libraries(DView ${CMAKE_DL_LIBS} ${FONTCONFIG_LIBRARY})
endif()
install(TARGETS DView DESTINATION . )
if(WIN32 OR APPLE)
install(CODE "
include(BundleUtilities)
set(BU_CHMOD_BUNDLE_ITEMS true)
fixup_bundle(\"${APPS}\" \"\" \"${wxWidgets_LIBRARY_DIRS}\")
")
endif()