OLD | NEW |
1 # Boilerplate. | 1 # Boilerplate. |
2 cmake_minimum_required (VERSION 3.1) # First version with CMAKE_CXX_STANDARD. | 2 cmake_minimum_required (VERSION 3.1) # First version with CMAKE_CXX_STANDARD. |
3 project (skimake) | 3 project (skimake) |
4 set (CMAKE_CXX_STANDARD 11) | 4 set (CMAKE_CXX_STANDARD 11) |
5 | 5 |
6 # Default to Release mode. We're mainly targeting Skia users, not Skia develope
rs. | 6 # Default to Release mode. We're mainly targeting Skia users, not Skia develope
rs. |
7 if (NOT CMAKE_BUILD_TYPE) | 7 if (NOT CMAKE_BUILD_TYPE) |
8 set (CMAKE_BUILD_TYPE Release) | 8 set (CMAKE_BUILD_TYPE Release) |
9 endif () | 9 endif () |
10 | 10 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 | 64 |
65 # Remove OS-specific source files. | 65 # Remove OS-specific source files. |
66 if (NOT UNIX) | 66 if (NOT UNIX) |
67 remove_srcs(../src/ports/*_posix.cpp | 67 remove_srcs(../src/ports/*_posix.cpp |
68 ../src/ports/SkTLS_pthread.cpp | 68 ../src/ports/SkTLS_pthread.cpp |
69 ../src/ports/SkTime_Unix.cpp | 69 ../src/ports/SkTime_Unix.cpp |
70 ../src/utils/SkThreadUtils_pthread.cpp) | 70 ../src/utils/SkThreadUtils_pthread.cpp) |
71 endif() | 71 endif() |
72 if (APPLE OR NOT UNIX) | 72 if (APPLE OR NOT UNIX) |
73 remove_srcs(../src/gpu/gl/glx/* | 73 remove_srcs(../src/gpu/gl/glx/* |
74 ../src/images/SkImageDecoder_FactoryDefault.cpp | 74 ../src/images/SkMovie_FactoryDefault.cpp |
75 ../src/ports/SkFontMgr_fontconfig*.cpp | 75 ../src/ports/SkFontMgr_fontconfig*.cpp |
76 ../src/ports/SkFontMgr_android*.cpp | 76 ../src/ports/SkFontMgr_android*.cpp |
77 ../src/*FreeType*) | 77 ../src/*FreeType*) |
78 endif() | 78 endif() |
79 | 79 |
80 # Remove processor-specific source files. | 80 # Remove processor-specific source files. |
81 if (NOT CMAKE_SYSTEM_PROCESSOR STREQUAL ARM) | 81 if (NOT CMAKE_SYSTEM_PROCESSOR STREQUAL ARM) |
82 remove_srcs(../src/*arm* ../src/*ARM* ../src/*neon* ../src/*NEON*) | 82 remove_srcs(../src/*arm* ../src/*ARM* ../src/*neon* ../src/*NEON*) |
83 endif() | 83 endif() |
84 if (NOT CMAKE_SYSTEM_PROCESSOR STREQUAL MIPS) | 84 if (NOT CMAKE_SYSTEM_PROCESSOR STREQUAL MIPS) |
(...skipping 10 matching lines...) Expand all Loading... |
95 ../src/gpu/gl/command_buffer/* | 95 ../src/gpu/gl/command_buffer/* |
96 ../src/gpu/gl/egl/* | 96 ../src/gpu/gl/egl/* |
97 ../src/gpu/gl/iOS/* | 97 ../src/gpu/gl/iOS/* |
98 ../src/gpu/vk/* | 98 ../src/gpu/vk/* |
99 ../src/opts/SkBitmapProcState_opts_none.cpp | 99 ../src/opts/SkBitmapProcState_opts_none.cpp |
100 ../src/opts/SkBlitMask_opts_none.cpp | 100 ../src/opts/SkBlitMask_opts_none.cpp |
101 ../src/opts/SkBlitRow_opts_none.cpp | 101 ../src/opts/SkBlitRow_opts_none.cpp |
102 ../src/ports/SkFontMgr_empty_factory.cpp | 102 ../src/ports/SkFontMgr_empty_factory.cpp |
103 ../src/ports/SkGlobalInitialization_chromium.cpp | 103 ../src/ports/SkGlobalInitialization_chromium.cpp |
104 ../src/ports/SkImageDecoder_empty.cpp | 104 ../src/ports/SkImageDecoder_empty.cpp |
| 105 ../src/ports/SkImageEncoder_none.cpp |
105 ../src/ports/SkImageGenerator_none.cpp | 106 ../src/ports/SkImageGenerator_none.cpp |
106 ../src/ports/SkTLS_none.cpp) | 107 ../src/ports/SkTLS_none.cpp) |
107 | 108 |
108 if (NOT APPLE) | 109 if (NOT APPLE) |
109 remove_srcs(../src/ports/SkImageGeneratorCG.cpp) | 110 remove_srcs(../src/ports/SkImageGeneratorCG.cpp) |
110 endif() | 111 endif() |
111 | 112 |
112 if (NOT WIN32) | 113 if (NOT WIN32) |
113 remove_srcs(../src/ports/SkImageGeneratorWIC.cpp) | 114 remove_srcs(../src/ports/SkImageGeneratorWIC.cpp) |
114 endif() | 115 endif() |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 list (APPEND libs ${EXPAT_LIBRARIES}) | 165 list (APPEND libs ${EXPAT_LIBRARIES}) |
165 else() | 166 else() |
166 remove_srcs (../src/ports/SkFontMgr_android_parser.cpp) | 167 remove_srcs (../src/ports/SkFontMgr_android_parser.cpp) |
167 endif() | 168 endif() |
168 | 169 |
169 if (GIF_FOUND) | 170 if (GIF_FOUND) |
170 list (APPEND private_includes ${GIF_INCLUDE_DIRS}) | 171 list (APPEND private_includes ${GIF_INCLUDE_DIRS}) |
171 list (APPEND libs ${GIF_LIBRARIES}) | 172 list (APPEND libs ${GIF_LIBRARIES}) |
172 add_definitions(-DSK_CODEC_DECODES_GIF) | 173 add_definitions(-DSK_CODEC_DECODES_GIF) |
173 else() | 174 else() |
174 remove_srcs(../src/images/*gif*) | 175 remove_srcs(../src/images/*GIF*) |
175 remove_srcs(../src/codec/*Gif*) | 176 remove_srcs(../src/codec/*Gif*) |
176 endif() | 177 endif() |
177 | 178 |
178 if (JPEG_FOUND) | 179 if (JPEG_FOUND) |
179 list (APPEND private_includes ${JPEG_INCLUDE_DIRS}) | 180 list (APPEND private_includes ${JPEG_INCLUDE_DIRS}) |
180 list (APPEND libs ${JPEG_LIBRARIES}) | 181 list (APPEND libs ${JPEG_LIBRARIES}) |
181 add_definitions(-DSK_CODEC_DECODES_JPEG) | 182 add_definitions(-DSK_CODEC_DECODES_JPEG) |
182 else() | 183 else() |
183 remove_srcs(../src/images/*jpeg*) | 184 remove_srcs(../src/images/*JPEG*) |
184 remove_srcs(../src/images/*Jpeg*) | |
185 remove_srcs(../src/codec/*Jpeg*) | 185 remove_srcs(../src/codec/*Jpeg*) |
186 endif() | 186 endif() |
187 | 187 |
188 if (LUA_FOUND) | 188 if (LUA_FOUND) |
189 list (APPEND private_includes ${LUA_INCLUDE_DIR}) | 189 list (APPEND private_includes ${LUA_INCLUDE_DIR}) |
190 list (APPEND libs ${LUA_LIBRARIES}) | 190 list (APPEND libs ${LUA_LIBRARIES}) |
191 else() | 191 else() |
192 remove_srcs(../src/utils/*Lua*) | 192 remove_srcs(../src/utils/*Lua*) |
193 endif() | 193 endif() |
194 | 194 |
195 if (PNG_FOUND) | 195 if (PNG_FOUND) |
196 list (APPEND private_includes ${PNG_INCLUDE_DIRS}) | 196 list (APPEND private_includes ${PNG_INCLUDE_DIRS}) |
197 list (APPEND libs ${PNG_LIBRARIES}) | 197 list (APPEND libs ${PNG_LIBRARIES}) |
198 add_definitions(-DPNG_SKIP_SETJMP_CHECK) | 198 add_definitions(-DPNG_SKIP_SETJMP_CHECK) |
199 add_definitions(-DPNG_SKIP_SKIA_OPTS) | 199 add_definitions(-DPNG_SKIP_SKIA_OPTS) |
200 add_definitions(-DSK_CODEC_DECODES_PNG) | 200 add_definitions(-DSK_CODEC_DECODES_PNG) |
201 else() | 201 else() |
202 remove_srcs(../src/images/*png*) | 202 remove_srcs(../src/images/*PNG*) |
203 remove_srcs(../src/codec/*Png*) | 203 remove_srcs(../src/codec/*Png*) |
204 remove_srcs(../src/codec/*Ico*) | 204 remove_srcs(../src/codec/*Ico*) |
205 endif() | 205 endif() |
206 | 206 |
207 if (ZLIB_FOUND) | 207 if (ZLIB_FOUND) |
208 list (APPEND private_includes ${ZLIB_INCLUDE_DIRS}) | 208 list (APPEND private_includes ${ZLIB_INCLUDE_DIRS}) |
209 list (APPEND libs ${ZLIB_LIBRARIES}) | 209 list (APPEND libs ${ZLIB_LIBRARIES}) |
210 remove_srcs(../src/pdf/SkDocument_PDF_None.cpp) | 210 remove_srcs(../src/pdf/SkDocument_PDF_None.cpp) |
211 else() | 211 else() |
212 remove_srcs(../src/pdf/*.cpp) | 212 remove_srcs(../src/pdf/*.cpp) |
213 set (srcs ${srcs} ../src/pdf/SkDocument_PDF_None.cpp) | 213 set (srcs ${srcs} ../src/pdf/SkDocument_PDF_None.cpp) |
214 endif() | 214 endif() |
215 | 215 |
216 if (WEBP_INCLUDE_DIRS AND WEBP_LIBRARIES) | 216 if (WEBP_INCLUDE_DIRS AND WEBP_LIBRARIES) |
217 list (APPEND private_includes ${WEBP_INCLUDE_DIRS}) | 217 list (APPEND private_includes ${WEBP_INCLUDE_DIRS}) |
218 list (APPEND libs ${WEBP_LIBRARIES}) | 218 list (APPEND libs ${WEBP_LIBRARIES}) |
219 add_definitions(-DSK_CODEC_DECODES_WEBP) | 219 add_definitions(-DSK_CODEC_DECODES_WEBP) |
220 else() | 220 else() |
221 remove_srcs(../src/images/*webp*) | 221 remove_srcs(../src/images/*WEBP*) |
222 remove_srcs(../src/codec/*Webp*) | 222 remove_srcs(../src/codec/*Webp*) |
223 endif() | 223 endif() |
224 | 224 |
225 if (FREETYPE_FOUND) | 225 if (FREETYPE_FOUND) |
226 list (APPEND private_includes ${FREETYPE_INCLUDE_DIRS}) | 226 list (APPEND private_includes ${FREETYPE_INCLUDE_DIRS}) |
227 list (APPEND libs ${FREETYPE_LIBRARIES}) | 227 list (APPEND libs ${FREETYPE_LIBRARIES}) |
228 endif() | 228 endif() |
229 | 229 |
230 if (FONTCONFIG_INCLUDE_DIRS AND FONTCONFIG_LIBRARIES) | 230 if (FONTCONFIG_INCLUDE_DIRS AND FONTCONFIG_LIBRARIES) |
231 list (APPEND private_includes ${FONTCONFIG_INCLUDE_DIRS}) | 231 list (APPEND private_includes ${FONTCONFIG_INCLUDE_DIRS}) |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 file (APPEND ${skia_h_path} "#include \"${filename_component}\"\n") | 330 file (APPEND ${skia_h_path} "#include \"${filename_component}\"\n") |
331 endif () | 331 endif () |
332 endforeach() | 332 endforeach() |
333 endif() | 333 endif() |
334 endforeach() | 334 endforeach() |
335 file(APPEND ${skia_h_path} "\n#endif // skia_DEFINED\n") | 335 file(APPEND ${skia_h_path} "\n#endif // skia_DEFINED\n") |
336 | 336 |
337 # Now build a simple example app that uses Skia via libskia.so. | 337 # Now build a simple example app that uses Skia via libskia.so. |
338 add_executable(example example.cpp) | 338 add_executable(example example.cpp) |
339 target_link_libraries(example skia ${OPENGL_LIBRARIES}) | 339 target_link_libraries(example skia ${OPENGL_LIBRARIES}) |
OLD | NEW |