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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 | 106 |
107 if (WIN32) | 107 if (WIN32) |
108 if(SKIA_GDI) | 108 if(SKIA_GDI) |
109 remove_srcs(../src/ports/SkFontMgr_win_dw_factory.cpp) | 109 remove_srcs(../src/ports/SkFontMgr_win_dw_factory.cpp) |
110 else() | 110 else() |
111 remove_srcs(../src/ports/SkFontMgr_win_gdi_factory.cpp) | 111 remove_srcs(../src/ports/SkFontMgr_win_gdi_factory.cpp) |
112 endif() | 112 endif() |
113 endif() | 113 endif() |
114 | 114 |
115 remove_srcs(../src/gpu/gl/angle/*) # TODO | 115 remove_srcs(../src/gpu/gl/angle/*) # TODO |
116 remove_srcs(../src/codec/* ../src/android/*) # TODO: Requires Chromium's libjpe
g-turbo, and incompatible giflib. | 116 remove_srcs(../src/android/*) |
117 | 117 |
118 # Certain files must be compiled with support for SSSE3, SSE4.1, AVX, or AVX2 in
trinsics. | 118 # Certain files must be compiled with support for SSSE3, SSE4.1, AVX, or AVX2 in
trinsics. |
119 file (GLOB_RECURSE ssse3_srcs ../src/*ssse3*.cpp ../src/*SSSE3*.cpp) | 119 file (GLOB_RECURSE ssse3_srcs ../src/*ssse3*.cpp ../src/*SSSE3*.cpp) |
120 file (GLOB_RECURSE sse41_srcs ../src/*sse4*.cpp ../src/*SSE4*.cpp) | 120 file (GLOB_RECURSE sse41_srcs ../src/*sse4*.cpp ../src/*SSE4*.cpp) |
121 file (GLOB_RECURSE avx_srcs ../src/*_avx.cpp) | 121 file (GLOB_RECURSE avx_srcs ../src/*_avx.cpp) |
122 file (GLOB_RECURSE avx2_srcs ../src/*_avx2.cpp) | 122 file (GLOB_RECURSE avx2_srcs ../src/*_avx2.cpp) |
123 set_source_files_properties(${ssse3_srcs} PROPERTIES COMPILE_FLAGS -mssse3) | 123 set_source_files_properties(${ssse3_srcs} PROPERTIES COMPILE_FLAGS -mssse3) |
124 set_source_files_properties(${sse41_srcs} PROPERTIES COMPILE_FLAGS -msse4.1) | 124 set_source_files_properties(${sse41_srcs} PROPERTIES COMPILE_FLAGS -msse4.1) |
125 set_source_files_properties(${avx_srcs} PROPERTIES COMPILE_FLAGS -mavx) | 125 set_source_files_properties(${avx_srcs} PROPERTIES COMPILE_FLAGS -mavx) |
126 set_source_files_properties(${avx2_srcs} PROPERTIES COMPILE_FLAGS -mavx2) | 126 set_source_files_properties(${avx2_srcs} PROPERTIES COMPILE_FLAGS -mavx2) |
(...skipping 25 matching lines...) Expand all Loading... |
152 list (APPEND private_includes ${EXPAT_INCLUDE_DIRS}) | 152 list (APPEND private_includes ${EXPAT_INCLUDE_DIRS}) |
153 list (APPEND libs ${EXPAT_LIBRARIES}) | 153 list (APPEND libs ${EXPAT_LIBRARIES}) |
154 else() | 154 else() |
155 remove_srcs (../src/ports/SkFontMgr_android_parser.cpp) | 155 remove_srcs (../src/ports/SkFontMgr_android_parser.cpp) |
156 endif() | 156 endif() |
157 | 157 |
158 if (GIF_FOUND) | 158 if (GIF_FOUND) |
159 list (APPEND private_includes ${GIF_INCLUDE_DIRS}) | 159 list (APPEND private_includes ${GIF_INCLUDE_DIRS}) |
160 list (APPEND libs ${GIF_LIBRARIES}) | 160 list (APPEND libs ${GIF_LIBRARIES}) |
161 else() | 161 else() |
| 162 remove_srcs(../src/codec/SkCodec.cpp) |
| 163 remove_srcs(../src/codec/*Gif*.cpp) |
162 remove_srcs(../src/images/*gif*) | 164 remove_srcs(../src/images/*gif*) |
163 endif() | 165 endif() |
164 | 166 |
165 if (JPEG_FOUND) | 167 if (JPEG_FOUND) |
166 list (APPEND private_includes ${JPEG_INCLUDE_DIRS}) | 168 list (APPEND private_includes ${JPEG_INCLUDE_DIRS}) |
167 list (APPEND libs ${JPEG_LIBRARIES}) | 169 list (APPEND libs ${JPEG_LIBRARIES}) |
168 else() | 170 else() |
| 171 remove_srcs(../src/codec/*Jpeg*.cpp) |
| 172 remove_srcs(../src/codec/*Raw*.cpp) |
169 remove_srcs(../src/images/*jpeg*) | 173 remove_srcs(../src/images/*jpeg*) |
170 endif() | 174 endif() |
171 | 175 |
172 if (LUA_FOUND) | 176 if (LUA_FOUND) |
173 list (APPEND private_includes ${LUA_INCLUDE_DIR}) | 177 list (APPEND private_includes ${LUA_INCLUDE_DIR}) |
174 list (APPEND libs ${LUA_LIBRARIES}) | 178 list (APPEND libs ${LUA_LIBRARIES}) |
175 else() | 179 else() |
176 remove_srcs(../src/utils/*Lua*) | 180 remove_srcs(../src/utils/*Lua*) |
177 endif() | 181 endif() |
178 | 182 |
179 if (PNG_FOUND) | 183 if (PNG_FOUND) |
180 list (APPEND private_includes ${PNG_INCLUDE_DIRS}) | 184 list (APPEND private_includes ${PNG_INCLUDE_DIRS}) |
181 list (APPEND libs ${PNG_LIBRARIES}) | 185 list (APPEND libs ${PNG_LIBRARIES}) |
182 else() | 186 else() |
| 187 remove_srcs(../src/codec/*Png*.cpp) |
| 188 remove_srcs(../src/codec/*Ico*.cpp) |
183 remove_srcs(../src/images/*png*) | 189 remove_srcs(../src/images/*png*) |
184 endif() | 190 endif() |
185 | 191 |
186 if (ZLIB_FOUND) | 192 if (ZLIB_FOUND) |
187 list (APPEND private_includes ${ZLIB_INCLUDE_DIRS}) | 193 list (APPEND private_includes ${ZLIB_INCLUDE_DIRS}) |
188 list (APPEND libs ${ZLIB_LIBRARIES}) | 194 list (APPEND libs ${ZLIB_LIBRARIES}) |
189 remove_srcs(../src/doc/SkDocument_PDF_None.cpp) | 195 remove_srcs(../src/doc/SkDocument_PDF_None.cpp) |
190 else() | 196 else() |
191 remove_srcs(../src/pdf/*.cpp ../src/doc/SkDocument_PDF.cpp) | 197 remove_srcs(../src/pdf/*.cpp ../src/doc/SkDocument_PDF.cpp) |
192 endif() | 198 endif() |
193 | 199 |
194 if (WEBP_INCLUDE_DIRS AND WEBP_LIBRARIES) | 200 if (WEBP_INCLUDE_DIRS AND WEBP_LIBRARIES) |
195 list (APPEND private_includes ${WEBP_INCLUDE_DIRS}) | 201 list (APPEND private_includes ${WEBP_INCLUDE_DIRS}) |
196 list (APPEND libs ${WEBP_LIBRARIES}) | 202 list (APPEND libs ${WEBP_LIBRARIES}) |
197 else() | 203 else() |
| 204 remove_srcs(../src/codec/SkWebpCodec.cpp) |
198 remove_srcs(../src/images/*webp*) | 205 remove_srcs(../src/images/*webp*) |
199 endif() | 206 endif() |
200 | 207 |
201 if (FREETYPE_FOUND) | 208 if (FREETYPE_FOUND) |
202 list (APPEND private_includes ${FREETYPE_INCLUDE_DIRS}) | 209 list (APPEND private_includes ${FREETYPE_INCLUDE_DIRS}) |
203 list (APPEND libs ${FREETYPE_LIBRARIES}) | 210 list (APPEND libs ${FREETYPE_LIBRARIES}) |
204 endif() | 211 endif() |
205 | 212 |
206 if (FONTCONFIG_INCLUDE_DIRS AND FONTCONFIG_LIBRARIES) | 213 if (FONTCONFIG_INCLUDE_DIRS AND FONTCONFIG_LIBRARIES) |
207 list (APPEND private_includes ${FONTCONFIG_INCLUDE_DIRS}) | 214 list (APPEND private_includes ${FONTCONFIG_INCLUDE_DIRS}) |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 file (APPEND ${skia_h_path} "#include \"${filename_component}\"\n") | 313 file (APPEND ${skia_h_path} "#include \"${filename_component}\"\n") |
307 endif () | 314 endif () |
308 endforeach() | 315 endforeach() |
309 endif() | 316 endif() |
310 endforeach() | 317 endforeach() |
311 file(APPEND ${skia_h_path} "\n#endif // skia_DEFINED\n") | 318 file(APPEND ${skia_h_path} "\n#endif // skia_DEFINED\n") |
312 | 319 |
313 # Now build a simple example app that uses Skia via libskia.so. | 320 # Now build a simple example app that uses Skia via libskia.so. |
314 add_executable(example example.cpp) | 321 add_executable(example example.cpp) |
315 target_link_libraries(example skia ${OPENGL_LIBRARIES}) | 322 target_link_libraries(example skia ${OPENGL_LIBRARIES}) |
OLD | NEW |