cmakepackagingefl

CMakeLists and packaging files for automatic Edje file compilation in project


I'm very new to EFL. And now I'm trying to get used to it. There is library named Edje. This library allows theming and other sort of things. But files for it are created in plain text and have to be compiled using edje_cc.

How can I add this compilation to CMakeLists.txt file and to packaging.spec file for it to be properly compiled and installed on the machine?

Sorry for my broken English.


Solution

  • In your CMakeLists.txt, do:

    ADD_CUSTOM_TARGET(your_edj_file.edj 
            COMMAND edje_cc your_edc_file.edc your_edj_file.edj
    )
    

    Notice that I simplified the COMMAND line - add the same arguments you use when you run edje_cc on a terminal (e.g. -id for images dir, -fd for fonts dir).

    With this line added to CMakeLists.txt, a call to cmake in your packaging.spec file should be enough.