Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Side by Side Diff: cmake/CMakeLists.txt

Issue 1835573002: [CMake fixes] Linux X11 pixel format and Windows compilation fix (Closed) Base URL: git@github.com:google/skia.git@master
Patch Set: added SkTypes.h Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | cmake/SkUserConfig.h.in » ('j') | src/ports/SkOSEnvironment.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 file(GLOB c_headers "../include/c/*.h") 285 file(GLOB c_headers "../include/c/*.h")
286 install(FILES ${c_headers} DESTINATION include) 286 install(FILES ${c_headers} DESTINATION include)
287 install(TARGETS skia DESTINATION lib) 287 install(TARGETS skia DESTINATION lib)
288 288
289 # SkUserConfig.h 289 # SkUserConfig.h
290 if (CMAKE_BUILD_TYPE STREQUAL Release) 290 if (CMAKE_BUILD_TYPE STREQUAL Release)
291 set (SK_RELEASE 1) 291 set (SK_RELEASE 1)
292 else() 292 else()
293 set (SK_RELEASE 0) 293 set (SK_RELEASE 0)
294 endif() 294 endif()
295 if (UNIX AND NOT APPLE)
296 set (SK_SAMPLES_FOR_X 1)
297 else()
298 set (SK_SAMPLES_FOR_X 0)
299 endif()
295 configure_file ("SkUserConfig.h.in" "${userconfig_directory}/SkUserConfig.h") 300 configure_file ("SkUserConfig.h.in" "${userconfig_directory}/SkUserConfig.h")
296 301
297 # skia_link_arguments.txt 302 # skia_link_arguments.txt
298 set (link_arguments ${CMAKE_BINARY_DIR}/skia_link_arguments.txt) 303 set (link_arguments ${CMAKE_BINARY_DIR}/skia_link_arguments.txt)
299 file (WRITE ${link_arguments} "-L${CMAKE_BINARY_DIR}\n") 304 file (WRITE ${link_arguments} "-L${CMAKE_BINARY_DIR}\n")
300 file (APPEND ${link_arguments} "-lskia\n") 305 file (APPEND ${link_arguments} "-lskia\n")
301 file (APPEND ${link_arguments} "-Wl,-rpath,${CMAKE_BINARY_DIR}\n") 306 file (APPEND ${link_arguments} "-Wl,-rpath,${CMAKE_BINARY_DIR}\n")
302 307
303 # skia_compile_arguments.txt 308 # skia_compile_arguments.txt
304 set (compile_arguments ${CMAKE_BINARY_DIR}/skia_compile_arguments.txt) 309 set (compile_arguments ${CMAKE_BINARY_DIR}/skia_compile_arguments.txt)
(...skipping 25 matching lines...) Expand all
330 file (APPEND ${skia_h_path} "#include \"${filename_component}\"\n") 335 file (APPEND ${skia_h_path} "#include \"${filename_component}\"\n")
331 endif () 336 endif ()
332 endforeach() 337 endforeach()
333 endif() 338 endif()
334 endforeach() 339 endforeach()
335 file(APPEND ${skia_h_path} "\n#endif // skia_DEFINED\n") 340 file(APPEND ${skia_h_path} "\n#endif // skia_DEFINED\n")
336 341
337 # Now build a simple example app that uses Skia via libskia.so. 342 # Now build a simple example app that uses Skia via libskia.so.
338 add_executable(example example.cpp) 343 add_executable(example example.cpp)
339 target_link_libraries(example skia ${OPENGL_LIBRARIES}) 344 target_link_libraries(example skia ${OPENGL_LIBRARIES})
OLDNEW
« no previous file with comments | « no previous file | cmake/SkUserConfig.h.in » ('j') | src/ports/SkOSEnvironment.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698