Commit Graph

22 Commits

Author SHA1 Message Date
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
Gustavo Sverzut Barbieri 0f8a6d04ab cmake: always use test target name, not simple name.
simple name may repeat, like 'suite'.
2017-01-23 18:19:29 -02:00
Gustavo Sverzut Barbieri 8ae1e02f05 cmake: be smart on internal libraries in the generated .pc files.
For internal libraries (those we have a target), generate a pkg-config
one instead of going with the -lNAME route.
2017-01-23 17:28:48 -02:00
Marcel Hollerbach 5b56f3a79d cmake: add that dependency to the right target
we need the eolian-bin for ${target}-eo not ${target}
2017-01-23 20:03:03 +01:00
Gustavo Sverzut Barbieri 7a32c13da7 cmake: reset temporary lists from cache.
otherwise new cmake runs will duplicate the lists over and over again.
2017-01-23 16:09:50 -02:00
Gustavo Sverzut Barbieri f59dfc3ab8 cmake: move functions to EflMacros.cmake 2017-01-23 16:09:50 -02:00
Marcel Hollerbach ea83a197be build: add eolian 2017-01-23 18:52:34 +01:00
Marcel Hollerbach 65ce7abb00 cmake: remove debugging output 2017-01-23 18:25:15 +01:00
Gustavo Sverzut Barbieri b10fc88bb0 EflMacros: build tests before running them.
'make test' wouldn't build the test, which is annoying.

There is no way to add dependencies to reserved target 'test'. The
test is also executed by another tool (ctest), not cmake itself, then
we must create a test '-build' that is actually calling back cmake to
compile the test suite and make it a dependency for the test itself.

Nasty but improves usability.
2017-01-23 18:23:41 +01:00
Marcel Hollerbach 71d6fcc0c4 build: add eo files generation to the macros
this will generate eo.h eo.c rules for SOURCES and public eo files.
This also installes the eo.h files from the public eo files into the
include directory, and installes the eo files into the correct location
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 308c8c4ef7 cmake: This should be public linked no private
otherwise we are linking symbols
2017-01-23 18:23:40 +01:00
Marcel Hollerbach e1e7614ea4 build: PACKAGE_BUILD_DIR is now defined for everyone 2017-01-23 18:23:40 +01:00
Marcel Hollerbach 2a5c2a0c3c cmake: improve versioning
The version defines are now done all the time. and the version pattern
does mach the one from autotools. And supports release mode now.
2017-01-23 18:23:40 +01:00
Marcel Hollerbach fe1863e30d cmake: move PACKAGE defines into a sane place
this should support all the vars used in all efl subsystems
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 d9815a6837 CMake: move eina binaries to single dir, add helper macros.
For one-source directories, be smart and just define SOURCES to that,
will reduce the number of too-simplistic CMakeLists.txt in our tree.

This also fixes problems with libraries, they should be private, not
public. So specify both kinds as different variables.
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 e1b98ca4f2 EflMacros: trust target name.
since this will be made automatic later and we can guarantee
consistency in the file hierarchy, no need to lowercase that.
2017-01-23 18:23:40 +01:00
Gustavo Sverzut Barbieri c4e78153b1 EflMacros: replace macros with functions.
Macros do not start a new scope and can leave leftovers, then use
functions. However to set and append to global scope is cumbersome,
add functions to aid that.
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