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

Side by Side Diff: cmake/CMakeLists.txt

Issue 2184483003: Move SkJSONCPP.h to tools. It tool-only. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update cmake Created 4 years, 4 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 | include/utils/SkJSONCPP.h » ('j') | no next file with comments »
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 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 get_filename_component (abs_include ${include} ABSOLUTE) 326 get_filename_component (abs_include ${include} ABSOLUTE)
327 file (APPEND ${compile_arguments} "-I${abs_include}\n") 327 file (APPEND ${compile_arguments} "-I${abs_include}\n")
328 endforeach() 328 endforeach()
329 329
330 # cmake . 330 # cmake .
331 # cmake --build . --target skia 331 # cmake --build . --target skia
332 # c++ -c @skia_compile_arguments.txt example.cpp 332 # c++ -c @skia_compile_arguments.txt example.cpp
333 # c++ example.o @skia_link_arguments.txt 333 # c++ example.o @skia_link_arguments.txt
334 334
335 # skia.h 335 # skia.h
336 set (bad_files GrGLConfig_chrome.h SkJSONCPP.h SkParsePaint.h) 336 set (bad_files GrGLConfig_chrome.h)
337 # make `c++ @skia_compile_arguments.txt include/skia.h` work. 337 # make `c++ @skia_compile_arguments.txt include/skia.h` work.
338 set (skia_h_path ${userconfig_directory}/skia.h) 338 set (skia_h_path ${userconfig_directory}/skia.h)
339 file (WRITE ${skia_h_path} "// skia.h generated by CMake.\n") 339 file (WRITE ${skia_h_path} "// skia.h generated by CMake.\n")
340 file(APPEND ${skia_h_path} "#ifndef skia_DEFINED\n") 340 file(APPEND ${skia_h_path} "#ifndef skia_DEFINED\n")
341 file(APPEND ${skia_h_path} "#define skia_DEFINED\n") 341 file(APPEND ${skia_h_path} "#define skia_DEFINED\n")
342 foreach (include ${public_includes}) 342 foreach (include ${public_includes})
343 if (NOT include STREQUAL userconfig_directory) 343 if (NOT include STREQUAL userconfig_directory)
344 file (APPEND ${skia_h_path} "\n") 344 file (APPEND ${skia_h_path} "\n")
345 file (GLOB all_public_headers ${include}/*.h) 345 file (GLOB all_public_headers ${include}/*.h)
346 foreach (public_header ${all_public_headers}) 346 foreach (public_header ${all_public_headers})
347 get_filename_component (filename_component ${public_header} NAME) 347 get_filename_component (filename_component ${public_header} NAME)
348 if (NOT ";${bad_files};" MATCHES ";${filename_component};") 348 if (NOT ";${bad_files};" MATCHES ";${filename_component};")
349 file (APPEND ${skia_h_path} "#include \"${filename_component}\"\n") 349 file (APPEND ${skia_h_path} "#include \"${filename_component}\"\n")
350 endif () 350 endif ()
351 endforeach() 351 endforeach()
352 endif() 352 endif()
353 endforeach() 353 endforeach()
354 file(APPEND ${skia_h_path} "\n#endif // skia_DEFINED\n") 354 file(APPEND ${skia_h_path} "\n#endif // skia_DEFINED\n")
355 355
356 # Now build a simple example app that uses Skia via libskia.so. 356 # Now build a simple example app that uses Skia via libskia.so.
357 add_executable(example example.cpp) 357 add_executable(example example.cpp)
358 target_link_libraries(example skia ${OPENGL_LIBRARIES}) 358 target_link_libraries(example skia ${OPENGL_LIBRARIES})
OLDNEW
« no previous file with comments | « no previous file | include/utils/SkJSONCPP.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698