From dbe75216c2316f43da6e6c25dd56ab16866b8636 Mon Sep 17 00:00:00 2001 From: Gustavo Sverzut Barbieri Date: Mon, 23 Jan 2017 16:48:50 -0200 Subject: [PATCH] please READ :-) --- TODO-cmake.txt | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 TODO-cmake.txt diff --git a/TODO-cmake.txt b/TODO-cmake.txt new file mode 100644 index 0000000000..2cb522f4a4 --- /dev/null +++ b/TODO-cmake.txt @@ -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.