summaryrefslogtreecommitdiff
path: root/src/lib/eina
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 /src/lib/eina
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 'src/lib/eina')
-rw-r--r--src/lib/eina/CMakeLists.txt3
-rw-r--r--src/lib/eina/eina_config.h.cmake99
2 files changed, 2 insertions, 100 deletions
diff --git a/src/lib/eina/CMakeLists.txt b/src/lib/eina/CMakeLists.txt
index 6c16016d99..dabbabf756 100644
--- a/src/lib/eina/CMakeLists.txt
+++ b/src/lib/eina/CMakeLists.txt
@@ -13,8 +13,6 @@ set(LIBRARIES
13 13
14if(ENABLE_VALGRIND) 14if(ENABLE_VALGRIND)
15 list(APPEND PKG_CONFIG_REQUIRES_PRIVATE valgrind) 15 list(APPEND PKG_CONFIG_REQUIRES_PRIVATE valgrind)
16 list(APPEND INCLUDE_DIRECTORIES ${VG_INCLUDE_DIRS})
17 list(APPEND LIBRARIES ${VG_LIBRARIES})
18endif() 16endif()
19 17
20set(PUBLIC_HEADERS 18set(PUBLIC_HEADERS
@@ -28,6 +26,7 @@ set(PUBLIC_HEADERS
28 eina_binshare.h 26 eina_binshare.h
29 eina_clist.h 27 eina_clist.h
30 eina_config.h 28 eina_config.h
29 eina_config_gen.h
31 eina_convert.h 30 eina_convert.h
32 eina_counter.h 31 eina_counter.h
33 eina_cow.h 32 eina_cow.h
diff --git a/src/lib/eina/eina_config.h.cmake b/src/lib/eina/eina_config.h.cmake
index a4aac7d99f..6db7c81eb5 100644
--- a/src/lib/eina/eina_config.h.cmake
+++ b/src/lib/eina/eina_config.h.cmake
@@ -23,104 +23,7 @@
23# include <Exotic.h> 23# include <Exotic.h>
24#endif 24#endif
25 25
26#ifdef EINA_MAGIC_DEBUG 26#include "eina_config_gen.h"
27# undef EINA_MAGIC_DEBUG
28#endif
29#cmakedefine EINA_MAGIC_DEBUG
30
31#ifndef EINA_DEFAULT_MEMPOOL
32# undef EINA_DEFAULT_MEMPOOL
33#endif
34#cmakedefine EINA_DEFAULT_MEMPOOL
35
36#ifdef EINA_SAFETY_CHECKS
37# undef EINA_SAFETY_CHECKS
38#endif
39#cmakedefine EINA_SAFETY_CHECKS
40
41#ifndef EINA_HAVE_THREADS
42#define EINA_HAVE_THREADS
43#endif
44
45#ifdef EINA_HAVE_PTHREAD_AFFINITY
46# undef EINA_HAVE_PTHREAD_AFFINITY
47#endif
48#cmakedefine EINA_HAVE_PTHREAD_AFFINITY
49
50#ifdef EINA_HAVE_PTHREAD_BARRIER
51# undef EINA_HAVE_PTHREAD_BARRIER
52#endif
53#cmakedefine EINA_HAVE_PTHREAD_BARRIER
54
55#ifdef EINA_HAVE_PTHREAD_SETNAME
56# undef EINA_HAVE_PTHREAD_SETNAME
57#endif
58#cmakedefine EINA_HAVE_PTHREAD_SETNAME
59
60#ifdef EINA_HAVE_DEBUG_THREADS
61# undef EINA_HAVE_DEBUG_THREADS
62#endif
63#cmakedefine EINA_HAVE_DEBUG_THREADS
64
65#ifdef EINA_SIZEOF_WCHAR_T
66# undef EINA_SIZEOF_WCHAR_T
67#endif
68#cmakedefine EINA_SIZEOF_WCHAR_T @EINA_SIZEOF_WCHAR_T@
69
70#ifdef EINA_SIZEOF_UINTPTR_T
71# undef EINA_SIZEOF_UINTPTR_T
72#endif
73#cmakedefine EINA_SIZEOF_UINTPTR_T @EINA_SIZEOF_UINTPTR_T@
74
75#ifdef EINA_CONFIGURE_HAVE_DIRENT_H
76# undef EINA_CONFIGURE_HAVE_DIRENT_H
77#endif
78#cmakedefine EINA_HAVE_DIRENT_H
79
80#ifdef EINA_CONFIGURE_ENABLE_LOG
81# undef EINA_CONFIGURE_ENABLE_LOG
82#endif
83#cmakedefine EINA_ENABLE_LOG
84
85#ifdef EINA_HAVE_ALLOCA_H
86# undef EINA_HAVE_ALLOCA_H
87#endif
88#cmakedefine EINA_HAVE_ALLOCA_H
89
90#ifdef EINA_HAVE_BSWAP16
91# undef EINA_HAVE_BSWAP16
92#endif
93#cmakedefine EINA_HAVE_BSWAP16
94
95#ifdef EINA_HAVE_BSWAP32
96# undef EINA_HAVE_BSWAP32
97#endif
98#cmakedefine EINA_HAVE_BSWAP32
99
100#ifdef EINA_HAVE_BSWAP64
101# undef EINA_HAVE_BSWAP64
102#endif
103#cmakedefine EINA_HAVE_BSWAP64
104
105#ifdef EINA_HAVE_BYTESWAP_H
106# undef EINA_HAVE_BYTESWAP_H
107#endif
108#cmakedefine EINA_HAVE_BYTESWAP_H
109
110#ifdef EINA_HAVE_POSIX_SPINLOCK
111# undef EINA_HAVE_POSIX_SPINLOCK
112#endif
113#cmakedefine EINA_HAVE_POSIX_SPINLOCK
114
115#ifndef EINA_HAVE_OSX_SPINLOCK
116# undef EINA_HAVE_OSX_SPINLOCK
117#endif
118@EINA_CONFIGURE_HAVE_OSX_SPINLOCK@
119
120#ifndef EINA_HAVE_OSX_SEMAPHORE
121# undef EINA_HAVE_OSX_SEMAPHORE
122#endif
123@EINA_CONFIGURE_HAVE_OSX_SEMAPHORE@
124 27
125#include <limits.h> 28#include <limits.h>
126 29