Commit Graph

35 Commits

Author SHA1 Message Date
Marcel Hollerbach bcdde959e6 cmake: add ecore_x 2017-02-07 09:24:52 +01:00
Gustavo Sverzut Barbieri 3cc60ce5f3 cmake: sync EFL_EO_API_SUPPORT definition with autotools.
in autotools we always define that symbol in config.h (thus now done
in common.cmake), while the Efl_Config.h that is generated never have
it, what's left is to enable/disable the legacy and beta APIs.

This fixes building eldbus_suite with cmake.
2017-02-03 12:36:50 -02:00
Marcel Hollerbach 3c0fe3ca3c cmake: add eeze
there is currently a bug in the testsuite which needs to change,
otherwise modules cannot be loaded. The code acutally runs when its
installed and EFL_RUN_IN_TREE is not set.
2017-02-03 10:59:04 +01:00
Gustavo Sverzut Barbieri a679c4a322 cmake: add ecore_file. 2017-02-02 17:15:31 -02:00
Marcel Hollerbach 8dc1166eaa cmake: use the jpeg module of cmake to find the library
finding libjpeg can be a bit more complex, there are systems that are
not delivering a .pc for it. So we should just use the cmake module to
find it.
2017-02-01 12:18:33 +01:00
Gustavo Sverzut Barbieri f6cac7ed9a cmake: add ecore_con. 2017-01-27 17:26:05 -02:00
Gustavo Sverzut Barbieri f5e6b06298 cmake/eo: expose HAVE_EO_ID to build via config_gen.h 2017-01-27 17:26:05 -02:00
Gustavo Sverzut Barbieri f1959acadd cmake: enable systemd/upower ecore modules.
eldbus was a dependency.
2017-01-26 16:21:17 -02:00
Gustavo Sverzut Barbieri 2ba33b8ff0 cmake: add eldbus. 2017-01-26 16:16:15 -02:00
Gustavo Sverzut Barbieri 85a095f0a8 cmake: fix strlcpy() detection and usage.
Linux usually ship with strlcpy(), but it's inside bsd/string.h and
needs -lbsd.

On BSD it's inside string.h and libc.
2017-01-26 15:53:14 -02:00
Gustavo Sverzut Barbieri 4ed139a49c cmake: more headers and function checks. 2017-01-26 15:53:14 -02:00
Gustavo Sverzut Barbieri ebab91182c cmake/eolian: fix EOLIAN_BIN type.
So EOLIAN_BIN had no type, which resulted in BOOL and thus ON/OFF. It
should be labeled as FILEPATH and then we can remove the special case
in EflMacros.cmake.
2017-01-26 14:48:20 -02:00
Gustavo Sverzut Barbieri b67acda0d6 cmake: add emile and EFL_OPTION_BACKEND()
Add emile and with that EFL_OPTION_BACKEND() to support choosing among
different backends for something, in emile's case it's crypto backend
(gnutls, openssl or none).
2017-01-26 14:23:24 -02:00
Gustavo Sverzut Barbieri 8de264f597 cmake: pkg-config can have version and needs HAVE/ENABLED defines.
pkg-config names can be encoded with a version requirement, such as
zlib>=1.2.3, thus we need to remove that from the variable.

with autotools we used HAVE_XXX and ENABLED_XXX to instruct such
optional library was present, then define that just for the user
target by adding that to its CFLAGS.

This allows us to remove some defines that matches the name, only
leave those that translate from original pkg-config name, such as
libsystemd->systemd.
2017-01-26 14:23:24 -02:00
Gustavo Sverzut Barbieri f958921177 cmake: add ecore.
no tests or modules (which depend on eldbus).
2017-01-25 19:29:20 -02:00
Gustavo Sverzut Barbieri f74ca08be9 cmake/eina: check more required functions and link with unwind if found.
unwind is needed for debug, thus link to that.
2017-01-25 19:29:20 -02:00
Gustavo Sverzut Barbieri fd8865d0d0 cmake: EFL_OPTION() now supports DEPENDS to handle conditionals.
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.
2017-01-25 19:29:20 -02:00
Gustavo Sverzut Barbieri 4d21d6c56a cmake/common: add missing checks for eina, simplify to one file.
Since the macros were moved to EflMacros.cmake, there is no reason to
keep CommonHeaderChecks.cmake anymore, put them all in
config/common.cmake

Keep the checks sorted so they're easy to organize.

Add missing check for prctl() and iconv() (which we were checking
iconv.h, but the code used '#if HAVE_ICONV').
2017-01-25 19:29:20 -02:00
Gustavo Sverzut Barbieri fa92926469 cmake: major rework of check and pkg-config dependencies.
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.
2017-01-23 23:55:33 -02:00
Gustavo Sverzut Barbieri ff0d88b7ba cmake/eina: match configure.ac and build all modules statically by default. 2017-01-23 19:50:04 -02:00
Gustavo Sverzut Barbieri 5e294031de cmake: fix module define translation.
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.
2017-01-23 18:25:22 -02:00
Marcel Hollerbach 27504d7db0 cmake: add eo 2017-01-23 20:02:06 +01:00
Marcel Hollerbach ea83a197be build: add eolian 2017-01-23 18:52:34 +01:00
Gustavo Sverzut Barbieri fe7a21170c cmake: reduce number of redundant variables set in cmake.
Avoid redundant variables in cmake, whenever they are needed as
duplicates, only do that in the template.
2017-01-23 18:23:41 +01:00
Marcel Hollerbach 34074fd0e7 build: use CMAKE defined variables 2017-01-23 18:23:40 +01:00
Marcel Hollerbach 6c87f62b90 build: make eina working
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.
2017-01-23 18:23:40 +01:00
Marcel Hollerbach 23dddf8e1c build: define symbol exist variables for local scope
otherwise CHECK_SYMBOL_EXISTS doesnt work as expected.
2017-01-23 18:23:40 +01:00
Marcel Hollerbach 5c548d4c63 build: we build dev per default 2017-01-23 18:23:40 +01:00
Marcel Hollerbach 40cb00dc57 build: set MODULE_ARCH correctly 2017-01-23 18:23:40 +01:00
Gustavo Sverzut Barbieri 8df6ac453d EflMacros: automatically provide ON;OFF;STATIC option and defines.
Automatically create one option to enable, disable or make it
statically linked into the code, with a define to reflect build type.
2017-01-23 18:23:40 +01:00
Marcel Hollerbach 9f2a2f7968 cmake: we need to enable beta api support
otherwise we cannot build our own api...
2017-01-23 18:23:40 +01:00
Gustavo Sverzut Barbieri 76e68de5d6 EflMacros: auto-handling of pkg-config files. 2017-01-23 18:23:40 +01:00
Gustavo Sverzut Barbieri 3d5abc081f EflMacros: major improvements towards usability.
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.
2017-01-23 18:23:40 +01:00
Gustavo Sverzut Barbieri 76212a9162 CMake: infra to build modules (static, on or off). 2017-01-23 18:23:40 +01:00
Gustavo Sverzut Barbieri dee24c3821 CMake: rework to use some helper macros.
This tries to defines some macros to create a cleaner build system.
2017-01-23 18:23:40 +01:00