summaryrefslogtreecommitdiff
path: root/TODO-cmake.txt
blob: 2cb522f4a4e6404652c085f2c2f075100ec87659 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
Help Cmake build system come true by helping with the following
tasks. Most of them can be done on top of autotools only, then we'll
catch-up with the cmake parts.

General (non-CMake specific) Tasks:

 - move each target (binary, lib, test) to its own directory, example:
   src/lib/efreet contains efreet_mime and efreet_trash in addition to
   efreet. Create src/lib/efreet_mime and src/lib/efreet_trash.

   It also applies to tests (ie: src/tests/ector which contains both
   ector_suite and cxx_compile_test), in the case of binaries and
   tests make sure to contain them in the library folder:
   src/tests/ector should then contain 2 folders, one for each
   test. Another one is src/tests/eo, which contains lots of
   stand-alone tests in addition to eo_suite.

 - uniform installation (and lookup!) of modules, like
   lib/evas/modules/engines/NAME/v-1.18/module.so versus
   lib/ecore/system/NAME/v-1.18/module.so (missing 'modules/')
   lib/ecore_evas/engines/NAME/v-1.18/module.so (missing 'modules/')

 - uniform module enable variables:
   {LIB}_MODULE_TYPE_{SCOPE}_{MODNAME}_STATIC (static/built-in, with scope)
   {LIB}_MODULE_TYPE_{SCOPE}_{MODNAME}_DYNAMIC (dynamic, with scope)
   {LIB}_MODULE_TYPE_{MODNAME}_STATIC (static/built-in, no scope)
   {LIB}_MODULE_TYPE_{MODNAME}_DYNAMIC (dynamic, no scope)
   Example:
   EINA_MODULE_TYPE_MP_PASS_THROUGH_STATIC
      instead of EINA_STATIC_BUILD_PASS_THROUGH
   EVAS_MODULE_TYPE_ENGINE_FB
      instead of EVAS_STATIC_BUILD_FB
   As this will make clear we're dealing with modules and their scope
   (if any, things like Ecore_IMF have no module scope).


CMake Tasks:

 - add src/lib/NAME/CMakeLists.txt defining SOURCES, PUBLIC_HEADERS,
   PKG_CONFIG_REQUIRES, PKG_CONFIG_REQUIRES_PRIVATE, LIBRARIES,
   PUBLIC_LIBRARIES and so on. See src/lib/eina/CMakeLists.txt as an
   example.

 - add options and dependency detection to cmake/config/NAME.cmake,
   see cmake/config/eina.cmake and cmake/config/common.cmake

 - add src/modules/NAME/SCOPE/MODNAME/CMakeLists.txt or
   src/modules/NAME/MODNAME/CMakeLists.txt (if no module scope). If
   single source and no special requiresments (libs, etc), then it
   should require no CMakeLists.txt and will be built automatically.

 - add src/bin/NAME/CMakeLists.txt (single binary of a lib) or
   src/bin/NAME/EXE_NAME/CMakeLists.txt (multiple binaries for a lib).
   If single source (one .c), then no CMakeLists.txt should be needed,
   see if it's already being built.

 - add src/tests/NAME/CMakeLists.txt (single test of a lib) or
   src/tests/NAME/EXE_NAME/CMakeLists.txt (multiple tests for a lib).
   If single source (one .c), then no CMakeLists.txt should be needed,
   see if it's already being built.

Since it's under development, check the code in cmake/helpers/*.cmake,
in particular cmake/helpers/EflMacros.cmake and check the comments and
also fix bugs :-)

Feedback on repetitive tasks and if you spot some
unification/simplification/automatization.