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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 VISIBILITY_INLINES_HIDDEN true) | 257 VISIBILITY_INLINES_HIDDEN true) |
258 | 258 |
259 # Experimental C API install: | 259 # Experimental C API install: |
260 file(GLOB c_headers "../include/c/*.h") | 260 file(GLOB c_headers "../include/c/*.h") |
261 install(FILES ${c_headers} DESTINATION include) | 261 install(FILES ${c_headers} DESTINATION include) |
262 install(TARGETS skia DESTINATION lib) | 262 install(TARGETS skia DESTINATION lib) |
263 | 263 |
264 # SkUserConfig.h | 264 # SkUserConfig.h |
265 if (CMAKE_BUILD_TYPE STREQUAL Release) | 265 if (CMAKE_BUILD_TYPE STREQUAL Release) |
266 set (SK_RELEASE 1) | 266 set (SK_RELEASE 1) |
| 267 else() |
| 268 set (SK_RELEASE 0) |
267 endif() | 269 endif() |
268 configure_file ("SkUserConfig.h.in" "${userconfig_directory}/SkUserConfig.h") | 270 configure_file ("SkUserConfig.h.in" "${userconfig_directory}/SkUserConfig.h") |
269 | 271 |
270 # skia_link_arguments.txt | 272 # skia_link_arguments.txt |
271 set (link_arguments ${CMAKE_BINARY_DIR}/skia_link_arguments.txt) | 273 set (link_arguments ${CMAKE_BINARY_DIR}/skia_link_arguments.txt) |
272 file (WRITE ${link_arguments} "-L${CMAKE_BINARY_DIR}\n") | 274 file (WRITE ${link_arguments} "-L${CMAKE_BINARY_DIR}\n") |
273 file (APPEND ${link_arguments} "-lskia\n") | 275 file (APPEND ${link_arguments} "-lskia\n") |
274 file (APPEND ${link_arguments} "-Wl,-rpath,${CMAKE_BINARY_DIR}\n") | 276 file (APPEND ${link_arguments} "-Wl,-rpath,${CMAKE_BINARY_DIR}\n") |
275 | 277 |
276 # skia_compile_arguments.txt | 278 # skia_compile_arguments.txt |
(...skipping 26 matching lines...) Expand all Loading... |
303 file (APPEND ${skia_h_path} "#include \"${filename_component}\"\n") | 305 file (APPEND ${skia_h_path} "#include \"${filename_component}\"\n") |
304 endif () | 306 endif () |
305 endforeach() | 307 endforeach() |
306 endif() | 308 endif() |
307 endforeach() | 309 endforeach() |
308 file(APPEND ${skia_h_path} "\n#endif // skia_DEFINED\n") | 310 file(APPEND ${skia_h_path} "\n#endif // skia_DEFINED\n") |
309 | 311 |
310 # Now build a simple example app that uses Skia via libskia.so. | 312 # Now build a simple example app that uses Skia via libskia.so. |
311 add_executable(example example.cpp) | 313 add_executable(example example.cpp) |
312 target_link_libraries(example skia ${OPENGL_LIBRARIES}) | 314 target_link_libraries(example skia ${OPENGL_LIBRARIES}) |
OLD | NEW |