please READ :-)
authorGustavo Sverzut Barbieri <barbieri@profusion.mobi>
Mon, 23 Jan 2017 18:48:50 +0000 (16:48 -0200)
committerGustavo Sverzut Barbieri <barbieri@profusion.mobi>
Mon, 23 Jan 2017 18:48:50 +0000 (16:48 -0200)
TODO-cmake.txt [new file with mode: 0644]

diff --git a/TODO-cmake.txt b/TODO-cmake.txt
new file mode 100644 (file)
index 0000000..2cb522f
--- /dev/null
@@ -0,0 +1,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.