summaryrefslogtreecommitdiff
path: root/cmake/helpers/EflMacros.cmake
Commit message (Collapse)AuthorAgeFilesLines
* cmake: remove!Marcel Hollerbach2018-12-201-1790/+0
| | | | | | | | This build was never complete and also was not maintained probebly. It is also dropped in favour of meson which is cool, merged, works & is fast. Differential Revision: https://phab.enlightenment.org/D7010
* cmake: handle 'FindXXX.cmake' standard with 'find-XXX' libraries.Gustavo Sverzut Barbieri2017-02-011-0/+84
| | | | | One can use virtual 'find-XXX' entries in LIBRARIES or PUBLIC_LIBRARIES to use XXX_LIBRARIES and XXX_INCLUDE_DIR.
* cmake: handle support libraries in .pcGustavo Sverzut Barbieri2017-02-011-5/+14
| | | | | | | support libraries (src/static_libs), such as rg_etc, must not be handled as a regular target, after all these are usually not shared library and if they are, they have no .pc associated, then we use "-l" as for system libraries, but using the installation path.
* cmake: pkg-config names uses dashes and are not uniform.Gustavo Sverzut Barbieri2017-01-271-6/+24
| | | | | | ecore_con provides ecore-con, but ethumb_client provides ethumb_client. That means we need replace '_' with '-' and allow to override that, so ethumb_client will work.
* cmake: create and install 'checkme' files for libraries.Gustavo Sverzut Barbieri2017-01-271-0/+4
|
* cmake: use CMAKE_INSTALL_LIBDIR instead of 'lib'Gustavo Sverzut Barbieri2017-01-271-13/+17
| | | | this matches the platform preference whenever lib, lib32 or lib64.
* cmake: EFL_BIN() now checks for EFL_UTILITY and installs to proper location.Gustavo Sverzut Barbieri2017-01-271-0/+11
| | | | | utility binaries shouldn't be in bin ($PATH), but in a library-specific directory (lib/${libname}/utils/v-${maj}.${min})
* cmake: remove comment, it was my misunderstanding, not a bug.Gustavo Sverzut Barbieri2017-01-271-1/+0
|
* cmake/eolian: generate source, headers and legacy in one command.Gustavo Sverzut Barbieri2017-01-271-13/+2
| | | | | actually wasn't a bug, I need to specify -gchl to generate legacy as well.
* cmake: add EFL_SUPPORT_LIB() and simplify/speedup its usage.Gustavo Sverzut Barbieri2017-01-271-0/+120
| | | | | | | | | | generate a static library for src/static_libs and use that as LIBRARIES for the actual library, for those such as rg_etc that are used multiple times will even speed up the final build by compiling only once. Although not used, they can be made into shared libraries that would go inside /usr/lib/efl/support/v-1.19/libname.so
* cmake/tests: improve naming and add missing include directories.Gustavo Sverzut Barbieri2017-01-271-0/+7
| | | | | | | | | Some tests were relocated to subdirectory but need shared files, or may need files from src/tests by including them relatively (../) as done in ector. With subdirectories we may end with src/test/libname/suite, to make it more user friendly and backward compatible call these libname_suite.
* cmake: auto-include subdirectories with generated .eo.*Gustavo Sverzut Barbieri2017-01-271-0/+6
|
* cmake: if path is absolute, include as-is.Gustavo Sverzut Barbieri2017-01-271-1/+1
|
* cmake: add embryo.Gustavo Sverzut Barbieri2017-01-261-1/+1
|
* cmake: add eldbus.Gustavo Sverzut Barbieri2017-01-261-8/+24
|
* cmake: improve options summary with per-library values.Gustavo Sverzut Barbieri2017-01-261-15/+43
| | | | segment the options based on libraries, makes it easier to read.
* cmake/eolian: fix EOLIAN_BIN type.Gustavo Sverzut Barbieri2017-01-261-5/+1
| | | | | | 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.
* cmake: define EFL_{LIB}_BUILD and DLL_EXPORT.Gustavo Sverzut Barbieri2017-01-261-1/+4
| | | | These are used on Windows builds to force dllexport/dllimport.
* cmake: auto-detect binaries in src/bin/libname if no CMakeLists.txtGustavo Sverzut Barbieri2017-01-261-0/+8
| | | | | similar to tests, binaries should also follow the same rule and allow single-binaries with single-source.
* cmake: auto-detect tests in src/tests/libname if no CMakeLists.txtGustavo Sverzut Barbieri2017-01-261-0/+4
| | | | | | previously we were only auto-detecting sources in src/tests/libname/ subdirectories, but we should also check the parent directory if no subdirectories were processed.
* cmake: fix test include and defines.Gustavo Sverzut Barbieri2017-01-261-3/+3
| | | | | | | | TESTS_WD is prefixed to TESTS_SRC_DIR and should be empty (no idea why it's like that, maybe to allow relative paths). TESTS_SRC_DIR must be defined to test source directory and a typo was preventing that.
* cmake: add emile and EFL_OPTION_BACKEND()Gustavo Sverzut Barbieri2017-01-261-0/+102
| | | | | | 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).
* cmake: pkg-config can have version and needs HAVE/ENABLED defines.Gustavo Sverzut Barbieri2017-01-261-3/+8
| | | | | | | | | | | | | 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.
* cmake: check for variable defined, not if it evaluates to false.Gustavo Sverzut Barbieri2017-01-251-2/+2
| | | | otherwise we can't have modules off by default.
* cmake: improvements to eolian handling.Gustavo Sverzut Barbieri2017-01-251-9/+46
| | | | | | | | | | | | | | | | | | | | | | - fix doc and state SOURCES shouldn't get any EO_FILES, these should go to the specific PUBLIC_EO_FILES or EO_FILES. - generate eolian files in relative directories, required by efl/interfaces - .eot files fail if you give -o c:..., they need an explicit "-gh" followed by "-o i:..." - .legacy.h are generated automatically, but needs an extra pass (q66 was informed about it) - if EOLIAN_BIN=on, then use in-tree binary, depending on such target only if it's the case. This allow cross-compiling and also bypass regenerate all .eo files if eina/eolian changed (as requested by Raster), simply reconfigure with EOLIAN_BIN=path, which can be EOLIAN_BIN=bin/eolian_gen if you wish ;-) - use COMMENT keyword to change the eolian summary (output)
* cmake: if EOLIAN_BIN=ON, use built eolian_gen.Gustavo Sverzut Barbieri2017-01-251-0/+3
|
* cmake: EFL_OPTION() now supports DEPENDS to handle conditionals.Gustavo Sverzut Barbieri2017-01-251-20/+92
| | | | | | | | 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.
* cmake: major rework of check and pkg-config dependencies.Gustavo Sverzut Barbieri2017-01-231-30/+156
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* cmake/eo: simplifies eo handling and generate eolian info in .pc.Gustavo Sverzut Barbieri2017-01-231-4/+30
| | | | | | | added 2 cmake target properties to collect private and public eo files, then that is used by EFL_CREATE_EO_RULES() instead of filtering SOURCES and also EFL_PKG_CONFIG_LIB_WRITE() to know if eolian entries should be generated.
* cmake: also process non-public eo files.Gustavo Sverzut Barbieri2017-01-231-1/+4
| | | | | the only difference is they do not get installed, but may be used to generate internal .eo.c
* cmake: cleanup EFL_CREATE_EO_RULES().Gustavo Sverzut Barbieri2017-01-231-26/+20
| | | | | it wasn't using the given generation_dir parameter, it was reseting the loop variable (which worked, but is nasty).
* cmake: minor simplification of eo files, do not leak vars.Gustavo Sverzut Barbieri2017-01-231-3/+6
| | | | | unset the eo variables before we go process modules, tests and binaries.
* cmake: fix module define translation.Gustavo Sverzut Barbieri2017-01-231-0/+2
| | | | | | | 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.
* cmake: always use test target name, not simple name.Gustavo Sverzut Barbieri2017-01-231-3/+3
| | | | simple name may repeat, like 'suite'.
* cmake: be smart on internal libraries in the generated .pc files.Gustavo Sverzut Barbieri2017-01-231-2/+10
| | | | | For internal libraries (those we have a target), generate a pkg-config one instead of going with the -lNAME route.
* cmake: add that dependency to the right targetMarcel Hollerbach2017-01-231-1/+1
| | | | we need the eolian-bin for ${target}-eo not ${target}
* cmake: reset temporary lists from cache.Gustavo Sverzut Barbieri2017-01-231-0/+10
| | | | otherwise new cmake runs will duplicate the lists over and over again.
* cmake: move functions to EflMacros.cmakeGustavo Sverzut Barbieri2017-01-231-0/+140
|
* build: add eolianMarcel Hollerbach2017-01-231-0/+1
|
* cmake: remove debugging outputMarcel Hollerbach2017-01-231-1/+0
|
* EflMacros: build tests before running them.Gustavo Sverzut Barbieri2017-01-231-0/+3
| | | | | | | | | | | '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.
* build: add eo files generation to the macrosMarcel Hollerbach2017-01-231-3/+71
| | | | | | 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
* EflMacros: automatically provide ON;OFF;STATIC option and defines.Gustavo Sverzut Barbieri2017-01-231-1/+13
| | | | | Automatically create one option to enable, disable or make it statically linked into the code, with a define to reflect build type.
* cmake: This should be public linked no privateMarcel Hollerbach2017-01-231-1/+1
| | | | otherwise we are linking symbols
* build: PACKAGE_BUILD_DIR is now defined for everyoneMarcel Hollerbach2017-01-231-1/+0
|
* cmake: improve versioningMarcel Hollerbach2017-01-231-0/+15
| | | | | The version defines are now done all the time. and the version pattern does mach the one from autotools. And supports release mode now.
* cmake: move PACKAGE defines into a sane placeMarcel Hollerbach2017-01-231-1/+2
| | | | this should support all the vars used in all efl subsystems
* EflMacros: auto-handling of pkg-config files.Gustavo Sverzut Barbieri2017-01-231-0/+134
|
* CMake: move eina binaries to single dir, add helper macros.Gustavo Sverzut Barbieri2017-01-231-22/+63
| | | | | | | | 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.
* EflMacros: major improvements towards usability.Gustavo Sverzut Barbieri2017-01-231-156/+396
| | | | | | | | 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.