-
Notifications
You must be signed in to change notification settings - Fork 5
/
CMakeExternal.txt
190 lines (162 loc) · 5.7 KB
/
CMakeExternal.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
if( NEED_JPEG )
SET( JBASEDIR ${SOURCES_ROOT}src/contrib/jpeg-9e )
SET( SYSDEPMEM jmemnobs.c )
# library object files common to compression and decompression
SET( COMSRCS jaricom.c jcomapi.c jutils.c jerror.c jmemmgr.c ${SYSDEPMEM} )
# compression library object files
SET( CLIBSRCS jcarith.c jcapimin.c jcapistd.c jctrans.c jcparam.c jdatadst.c
jcinit.c jcmaster.c jcmarker.c jcmainct.c jcprepct.c
jccoefct.c jccolor.c jcsample.c jchuff.c
jcdctmgr.c jfdctfst.c jfdctflt.c jfdctint.c )
# decompression library object files
SET( DLIBSRCS jdarith.c jdapimin.c jdapistd.c jdtrans.c jdatasrc.c
jdmaster.c jdinput.c jdmarker.c jdhuff.c
jdmainct.c jdcoefct.c jdpostct.c jddctmgr.c jidctfst.c
jidctflt.c jidctint.c jdsample.c jdcolor.c
jquant1.c jquant2.c jdmerge.c )
# These objectfiles are included in libjpeg.lib
FOREACH( SRC ${CLIBSRCS} ${COMSRCS} ${DLIBSRCS} )
LIST( APPEND JPEG_SOURCE ${JBASEDIR}/${SRC} )
ENDFOREACH( SRC )
Set( ExternalExtraDefinitions ${ExternalExtraDefinitions} JPEG_SOURCE;NO_GETENV )
# ya, this is sorta redundant... should fix that someday.
include_directories( ${SACK_BASE}/${JBASEDIR} )
#message( adding ${SACK_BASE}/${JPEG_SOURCE} )
if( FORCE_CXX )
#string( REPLACE "/RTC1" "/CLR" CMAKE_C_FLAGS_DEBUG_TMP ${CMAKE_C_FLAGS_DEBUG} )
#set_source_files_properties(${JPEG_SOURCE} PROPERTIES LANGUAGE CXX )
endif( FORCE_CXX )
source_group("Source Files\\Jpeg-9 Library" FILES ${JPEG_SOURCE})
endif( NEED_JPEG )
if( NEED_PNG )
if( NEED_ZLIB )
SET( ZBASEDIR ${SOURCES_ROOT}src/contrib/zlib-1.3 )
include( ${ZBASEDIR}/CMakeLists.part )
source_group("Source Files\\zlib-1.3 Library" FILES ${ZLIB_SOURCE})
endif( NEED_ZLIB )
SET( PBASEDIR ${SOURCES_ROOT}src/contrib/libpng-1.6.40 )
#SET( PBASEDIR ${SOURCES_ROOT}src/contrib/libpng-1.7.0b89 )
include( ${PBASEDIR}/CMakeLists.part )
if( FORCE_CXX )
#set_source_files_properties(${PNG_SOURCE} PROPERTIES LANGUAGE CXX )
endif( FORCE_CXX )
source_group("Source Files\\libpng-1.6.40 Library" FILES ${PNG_SOURCE})
# PNG_RESTRICT is defined here (and as blank) because if not defined, it gets defined to __restrict which made watcom fail
#set_source_files_properties(${PNG_SOURCE} PROPERTIES COMPILE_DEFINITIONS "PNG_RESTRICT" )
endif( NEED_PNG )
if( NEED_FREETYPE )
SET( FBASEDIR ${SOURCES_ROOT}src/contrib/freetype-2.13.2 )
SET( FREETYPE_INCLUDE_DIRS ${FBASEDIR}/include )
Set( ExternalExtraDefinitions ${ExternalExtraDefinitions} FREETYPE_SOURCE FT2_BUILD_LIBRARY FT_CONFIG_OPTION_USE_PNG )
set(FT_SRCS
src/autofit/autofit.c
src/base/ftbase.c
src/base/ftbbox.c
src/base/ftbdf.c
src/base/ftbitmap.c
src/base/ftcid.c
src/base/ftfstype.c
src/base/ftgasp.c
src/base/ftglyph.c
src/base/ftgxval.c
src/base/ftinit.c
src/base/ftmm.c
src/base/ftotval.c
src/base/ftpatent.c
src/base/ftpfr.c
src/base/ftstroke.c
src/base/ftsynth.c
src/base/fttype1.c
src/base/ftwinfnt.c
src/bdf/bdf.c
src/bzip2/ftbzip2.c
src/cache/ftcache.c
src/cff/cff.c
src/cid/type1cid.c
src/gzip/ftgzip.c
src/lzw/ftlzw.c
src/pcf/pcf.c
src/pfr/pfr.c
src/psaux/psaux.c
src/pshinter/pshinter.c
src/psnames/psnames.c
src/raster/raster.c
src/sdf/sdf.c
src/sfnt/sfnt.c
src/smooth/smooth.c
src/svg/svg.c
src/truetype/truetype.c
src/type1/type1.c
src/type42/type42.c
src/winfonts/winfnt.c
)
if (WIN32)
enable_language(RC)
elseif (WINCE)
else ()
endif ()
if (UNIX)
list(APPEND FT_SRCS "builds/unix/ftsystem.c")
list(APPEND FT_SRCS builds/wince/ftdebug.c)
elseif (WIN32)
list(APPEND FT_SRCS "builds/windows/ftsystem.c")
list(APPEND FT_SRCS builds/windows/ftdebug.c
# can't use multiple .rc files...
# src/base/ftver.rc
)
else ()
list(APPEND FT_SRCS "src/base/ftsystem.c")
list(APPEND FT_SRCS src/base/ftdebug.c)
endif ()
include_directories( ${FBASEDIR}/include )
FOREACH( SRC ${FT_SRCS} )
LIST( APPEND FREETYPE_SOURCE ${FBASEDIR}/${SRC} )
ENDFOREACH()
if (UNIX)
set_source_files_properties(${FREETYPE_SOURCE} PROPERTIES COMPILE_DEFINITIONS "HAVE_UNISTD_H" )
endif()
source_group("Source Files\\Freetype-2.13.2 Library" FILES ${FREETYPE_SOURCE})
endif()
if( BUILD_EXTRAS )
IF( NOT __ANDROID__ )
# Android math.h puked when building this.
#add_subdirectory( src/contrib/shapelib-1.3.0 )
ENDIF( NOT __ANDROID__ )
endif( BUILD_EXTRAS )
if( NEED_FUSE )
set( FUSEBASEDIR src/contrib/fuse-2.9.4 )
EXECUTE_PROCESS(COMMAND cmake -E copy_if_different ${CMAKE_SOURCE_DIR}/${FUSEBASEDIR}/include/config.h.android ${CMAKE_BINARY_DIR}/${FUSEBASEDIR}/include/config.h )
set( FUSE_MOUNT_SOURCES
${FUSEBASEDIR}/lib/mount.c
${FUSEBASEDIR}/lib/mount_util.c )
#set( FUSE_MOUNT_SOURCES
# ${FUSEBASEDIR}/lib/mount_bsd.c )
set( FUSE_SOURCES
${FUSEBASEDIR}/lib/mount_util.h
${FUSEBASEDIR}/lib/fuse.c
${FUSEBASEDIR}/lib/fuse_i.h
${FUSEBASEDIR}/lib/fuse_kern_chan.c
${FUSEBASEDIR}/lib/fuse_loop.c
${FUSEBASEDIR}/lib/fuse_loop_mt.c
${FUSEBASEDIR}/lib/fuse_lowlevel.c
${FUSEBASEDIR}/lib/fuse_misc.h
${FUSEBASEDIR}/lib/fuse_mt.c
${FUSEBASEDIR}/lib/fuse_opt.c
${FUSEBASEDIR}/lib/fuse_session.c
${FUSEBASEDIR}/lib/fuse_signals.c
${FUSEBASEDIR}/lib/buffer.c
${FUSEBASEDIR}/lib/cuse_lowlevel.c
${FUSEBASEDIR}/lib/helper.c
${FUSEBASEDIR}/lib/modules/subdir.c
${FUSEBASEDIR}/lib/ulockmgr.c
${FUSE_MOUNT_SOURCES}
)
Set( ExternalExtraDefinitions ${ExternalExtraDefinitions} FUSE_SOURCE
_FILE_OFFSET_BITS=64
_REENTRANT
FUSE_USE_VERSION=26
FUSERMOUNT_DIR=\".\"
)
SET_SOURCE_FILES_PROPERTIES( ${FUSE_SOURCES} PROPERTIES COMPILE_FLAGS -I${CMAKE_BINARY_DIR}/${FUSEBASEDIR}/include )
INCLUDE_DIRECTORIES( ${FUSEBASEDIR}/include )
endif( NEED_FUSE )