| OLD | NEW |
| 1 # Boilerplate. | 1 # Boilerplate. |
| 2 cmake_minimum_required (VERSION 3.3) # The latest version as I write this. Ma
y be too strict. | 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 |
| 11 # To first approximation, the Skia library comprises all .cpp files under src/. | 11 # To first approximation, the Skia library comprises all .cpp files under src/. |
| 12 file (GLOB_RECURSE srcs ../src/*.cpp) | 12 file (GLOB_RECURSE srcs ../src/*.cpp) |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 | 216 |
| 217 set_target_properties(skia PROPERTIES | 217 set_target_properties(skia PROPERTIES |
| 218 COMPILE_FLAGS "-fno-exceptions -fno-rtti -Wno-deprecated-declarations" | 218 COMPILE_FLAGS "-fno-exceptions -fno-rtti -Wno-deprecated-declarations" |
| 219 CXX_VISIBILITY_PRESET hidden | 219 CXX_VISIBILITY_PRESET hidden |
| 220 VISIBILITY_INLINES_HIDDEN true) | 220 VISIBILITY_INLINES_HIDDEN true) |
| 221 | 221 |
| 222 # Now build a simple example app that uses Skia via libskia.so. | 222 # Now build a simple example app that uses Skia via libskia.so. |
| 223 find_package(OpenGL REQUIRED) | 223 find_package(OpenGL REQUIRED) |
| 224 add_executable(example example.cpp) | 224 add_executable(example example.cpp) |
| 225 target_link_libraries(example skia ${OPENGL_LIBRARIES}) | 225 target_link_libraries(example skia ${OPENGL_LIBRARIES}) |
| OLD | NEW |