This is now used by ENABLE_SYSTEMD and ENABLE_VALGRIND, which moves to
"common.cmake" since they are shared among multiple libraries.
With that I found that LINK_FLAGS is indeed a string, not a CMake List
(space separated, not ";"), then fix that so compilation actually works.
make FUNC_CHECK(), TYPE_CHECK() and HEADER_CHECK() more general and
they can be set to a scope, like "eina", then all symbols are prefixed
with that. The scope is created with CHECK_INIT(), and
EFL_HEADER_CHECKS_FINALIZE() will finish that.
This makes it possible for cmake/config/eina.cmake +
cmake/post/eina.cmake to add stuff to the generated file, better than
hand edit the template.
CHECK_APPEND_DEFINE(name val) is now the base to add symbols to the
generated file in the current scope.
Then convert cmake/config/eina.cmake to use that and match the
autotools values (were a bit off).
This exposed enabling valgrind was broken due incorrect pkg-config
usage with cmake (it's not obvious), it was using just the libraries,
while LDFLAGS are needed to get -L/usr/lib/valgrind. Then also convert
to CFLAGS provided by pkg-config and make that automatic for
PKG_CONFIG_REQUIRES and PKG_CONFIG_REQUIRES_PRIVATE.
Also, eina-mempool modules use valgrind and must use that now that's
propagating correctly.
we can't check the options in config/eina.cmake as they were not
created at that point, instead we must have a "post" file that is
included after everything else is processed, options/targets all
exist and can be modified.
This brings in the checks for all the headers and function that are
required in eina. With this commit only a few other checks are missing.
This is NOT tested on windows or mac os i can just verify that it runs
here on a arch linux system.
Stick to one target per directory and remove prefix from variables,
makes it cleaner and easier to use.
Document variables used and use a more consistent name that matches
CMake properties.