summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@profusion.mobi>2017-01-23 23:55:33 -0200
committerGustavo Sverzut Barbieri <barbieri@profusion.mobi>2017-01-23 23:55:33 -0200
commitfa92926469881cdff7eda4627747fc964c2fa1a4 (patch)
tree9f2b5f016bef28ea01a1eabf05b127c899086eac /CMakeLists.txt
parentff0d88b7bae8fa14140210c5161beb944828bab5 (diff)
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.
Diffstat (limited to '')
-rw-r--r--CMakeLists.txt15
1 files changed, 7 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 09479ba..a1d5dba 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,10 +7,6 @@ include(EflMacros)
7 7
8EFL_PROJECT(1.19.99) 8EFL_PROJECT(1.19.99)
9 9
10if (NOT EFL_BUILD_ID)
11 set(EFL_BUILD_ID 120)
12endif()
13
14if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) 10if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
15 message(FATAL_ERROR "In-source builds not allowed. Use: mkdir -p build && cmake -H. -Bbuild") 11 message(FATAL_ERROR "In-source builds not allowed. Use: mkdir -p build && cmake -H. -Bbuild")
16endif() 12endif()
@@ -41,11 +37,14 @@ EFL_LIB(eo)
41 37
42EFL_OPTIONS_SUMMARY() 38EFL_OPTIONS_SUMMARY()
43 39
44configure_file( 40# TODO: when autotools is gone, rename this file in repository
45 ${PROJECT_SOURCE_DIR}/src/lib/efl/config.h.cmake 41# and remove this copy (using generate to skip @-subst)
46 ${PROJECT_BINARY_DIR}/src/lib/efl/config.h) 42file(GENERATE
43 OUTPUT ${PROJECT_BINARY_DIR}/src/lib/efl/config.h
44 INPUT ${PROJECT_SOURCE_DIR}/src/lib/efl/config.h.cmake)
45EFL_HEADER_CHECKS_FINALIZE(${PROJECT_BINARY_DIR}/src/lib/efl/config_gen.h)
46
47configure_file( 47configure_file(
48 ${PROJECT_SOURCE_DIR}/src/lib/efl/Efl_Config.h.cmake 48 ${PROJECT_SOURCE_DIR}/src/lib/efl/Efl_Config.h.cmake
49 ${PROJECT_BINARY_DIR}/src/lib/efl/Efl_Config.h) 49 ${PROJECT_BINARY_DIR}/src/lib/efl/Efl_Config.h)
50EFL_HEADER_CHECKS_FINALIZE(${PROJECT_BINARY_DIR}/src/lib/efl/config_headers.h)
51EFL_FINALIZE() 50EFL_FINALIZE()