Changes between Version 1 and Version 2 of AddingFiles


Ignore:
Timestamp:
Feb 4, 2014 9:42:19 AM (9 years ago)
Author:
BJ Burg
Comment:

instructions for adding to CMake

Legend:

Unmodified
Added
Removed
Modified
  • AddingFiles

    v1 v2  
    2323== CMake (GTK, EFL)
    2424
    25 TODO
     25Find the relevant `CMakeLists.txt` file in the project directory (WebCore, WebKit2, DumpRenderTree, etc). Then, add entries to various lists in the files depending on what is being added.
     26
     27=== Adding a directory
     28
     29 * If the directory contains header or implementation files, add it to `Project_INCLUDE_DIRECTORIES`.
     30 * If the directory contains IDL files, add it to `Project_IDL_INCLUDES`.
     31
     32=== Adding a file
     33
     34 * If it's an IDL file, add to the section `Project_IDL_FILES`.
     35 * If it's a new Inspector domain, add to `Project_INSPECTOR_DOMAINS`.
     36 * If it's a CPP file, add it to `Project_SOURCES`.
     37 * If the file depends on a feature flag, then wrap it in a conditional that appends extra values to the main lists if the feature is enabled. See existing CMakeLists.txt for examples of how to do this.
     38
     39=== Adding code generators / generated files
     40
     41You'll need to add a custom command, and append the generated files to `Project_SOURCES` or some other list. This adds the generated file as a build dependency, and the custom rule tells CMake how to derive the generated files. See existing files for examples.
    2642
    2743= Tips