summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@profusion.mobi>2017-01-27 12:38:52 -0200
committerGustavo Sverzut Barbieri <barbieri@profusion.mobi>2017-01-27 12:52:14 -0200
commit525d1e062975f732c54e40074d15500cdcaa4cb4 (patch)
treeb074fd0fef65f756ebbe2d5993313cbafcb882bc /src
parent28960d78513f95204a75e86af817efb3a343e6b0 (diff)
cmake: add EFL_SUPPORT_LIB() and simplify/speedup its usage.
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
Diffstat (limited to 'src')
-rw-r--r--src/Makefile_Ector.am1
-rw-r--r--src/Makefile_Evas.am1
-rw-r--r--src/lib/ector/CMakeLists.txt29
-rw-r--r--src/lib/eet/CMakeLists.txt9
-rw-r--r--src/lib/emile/CMakeLists.txt17
-rw-r--r--src/static_libs/draw/CMakeLists.txt17
-rw-r--r--src/static_libs/draw/draw.h3
-rw-r--r--src/static_libs/draw/draw_main.c1
-rw-r--r--src/static_libs/draw/draw_main_sse2.c1
-rw-r--r--src/static_libs/freetype/CMakeLists.txt5
-rw-r--r--src/static_libs/lz4/CMakeLists.txt6
-rw-r--r--src/static_libs/rg_etc/CMakeLists.txt10
-rw-r--r--src/static_libs/triangulator/CMakeLists.txt18
-rw-r--r--src/static_libs/triangulator/triangulator_simple.h6
-rw-r--r--src/static_libs/triangulator/triangulator_stroker.h4
15 files changed, 74 insertions, 54 deletions
diff --git a/src/Makefile_Ector.am b/src/Makefile_Ector.am
index 19053be5ba..df6e6d2532 100644
--- a/src/Makefile_Ector.am
+++ b/src/Makefile_Ector.am
@@ -155,6 +155,7 @@ lib/ector/gl/shader/ector_gl_shaders.x: $(ECTOR_GL_SHADERS_GEN)
155 @sh $(srcdir)/lib/ector/gl/shader/gen_shaders.sh 155 @sh $(srcdir)/lib/ector/gl/shader/gen_shaders.sh
156 156
157lib_ector_libector_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \ 157lib_ector_libector_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
158-I$(top_builddir)/src/lib \
158-I$(top_builddir)/src/lib/ector \ 159-I$(top_builddir)/src/lib/ector \
159-I$(top_builddir)/src/lib/ector/cairo \ 160-I$(top_builddir)/src/lib/ector/cairo \
160-I$(top_builddir)/src/lib/ector/software \ 161-I$(top_builddir)/src/lib/ector/software \
diff --git a/src/Makefile_Evas.am b/src/Makefile_Evas.am
index 620f6a0a48..2f58d5f518 100644
--- a/src/Makefile_Evas.am
+++ b/src/Makefile_Evas.am
@@ -407,6 +407,7 @@ lib_evas_libevas_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
407-I$(top_srcdir)/src/lib/evas/include \ 407-I$(top_srcdir)/src/lib/evas/include \
408-I$(top_srcdir)/src/static_libs/libunibreak \ 408-I$(top_srcdir)/src/static_libs/libunibreak \
409-I$(top_srcdir)/src/static_libs/draw \ 409-I$(top_srcdir)/src/static_libs/draw \
410-I$(top_builddir)/src/lib \
410-I$(top_builddir)/src/lib/evas/canvas \ 411-I$(top_builddir)/src/lib/evas/canvas \
411-I$(top_builddir)/src/lib/evas/include \ 412-I$(top_builddir)/src/lib/evas/include \
412-I$(top_builddir)/src/modules/evas/engines/software_generic \ 413-I$(top_builddir)/src/modules/evas/engines/software_generic \
diff --git a/src/lib/ector/CMakeLists.txt b/src/lib/ector/CMakeLists.txt
index 133909192b..71daae7705 100644
--- a/src/lib/ector/CMakeLists.txt
+++ b/src/lib/ector/CMakeLists.txt
@@ -5,6 +5,10 @@ set(LIBRARIES
5 efl 5 efl
6 emile 6 emile
7 m 7 m
8 support-draw
9 support-freetype
10 support-rg_etc
11 support-triangulator
8) 12)
9 13
10set(PUBLIC_LIBRARIES 14set(PUBLIC_LIBRARIES
@@ -99,31 +103,6 @@ set(SOURCES
99 software/ector_software_gradient.c 103 software/ector_software_gradient.c
100 software/ector_software_rasterizer.c 104 software/ector_software_rasterizer.c
101 software/ector_software_surface.c 105 software/ector_software_surface.c
102
103 ${CMAKE_SOURCE_DIR}/src/static_libs/draw/draw_main.c
104 ${CMAKE_SOURCE_DIR}/src/static_libs/draw/draw_main_neon.c
105 ${CMAKE_SOURCE_DIR}/src/static_libs/draw/draw_main_sse2.c
106
107 ${CMAKE_SOURCE_DIR}/src/static_libs/freetype/sw_ft_math.c
108 ${CMAKE_SOURCE_DIR}/src/static_libs/freetype/sw_ft_raster.c
109 ${CMAKE_SOURCE_DIR}/src/static_libs/freetype/sw_ft_stroker.c
110
111 ${CMAKE_SOURCE_DIR}/src/static_libs/rg_etc/etc2_encoder.c
112 ${CMAKE_SOURCE_DIR}/src/static_libs/rg_etc/rg_etc1.c
113 ${CMAKE_SOURCE_DIR}/src/static_libs/rg_etc/rg_etc1.h
114 ${CMAKE_SOURCE_DIR}/src/static_libs/rg_etc/rg_etc2.c
115
116 ${CMAKE_SOURCE_DIR}/src/static_libs/triangulator/triangulator_simple.c
117 ${CMAKE_SOURCE_DIR}/src/static_libs/triangulator/triangulator_simple.h
118 ${CMAKE_SOURCE_DIR}/src/static_libs/triangulator/triangulator_stroker.c
119 ${CMAKE_SOURCE_DIR}/src/static_libs/triangulator/triangulator_stroker.h
120)
121
122set(INCLUDE_DIRECTORIES
123 ${CMAKE_SOURCE_DIR}/src/static_libs/draw
124 ${CMAKE_SOURCE_DIR}/src/static_libs/freetype
125 ${CMAKE_SOURCE_DIR}/src/static_libs/rg_etc
126 ${CMAKE_SOURCE_DIR}/src/static_libs/triangulator
127) 106)
128 107
129add_custom_command( 108add_custom_command(
diff --git a/src/lib/eet/CMakeLists.txt b/src/lib/eet/CMakeLists.txt
index b0aaffd190..813f29340e 100644
--- a/src/lib/eet/CMakeLists.txt
+++ b/src/lib/eet/CMakeLists.txt
@@ -12,6 +12,7 @@ set(PUBLIC_LIBRARIES
12 12
13set(LIBRARIES 13set(LIBRARIES
14 m 14 m
15 support-rg_etc
15) 16)
16 17
17set(PUBLIC_HEADERS 18set(PUBLIC_HEADERS
@@ -29,14 +30,6 @@ set(SOURCES
29 eet_node.c 30 eet_node.c
30 Eet_private.h 31 Eet_private.h
31 eet_utils.c 32 eet_utils.c
32 ${CMAKE_SOURCE_DIR}/src/static_libs/rg_etc/rg_etc1.c
33 ${CMAKE_SOURCE_DIR}/src/static_libs/rg_etc/rg_etc2.c
34 ${CMAKE_SOURCE_DIR}/src/static_libs/rg_etc/etc2_encoder.c
35 ${CMAKE_SOURCE_DIR}/src/static_libs/rg_etc/rg_etc1.h
36)
37
38set(INCLUDE_DIRECTORIES
39 ${CMAKE_SOURCE_DIR}/src/static_libs/rg_etc
40) 33)
41 34
42if(WITH_CRYPTO STREQUAL "gnutls") 35if(WITH_CRYPTO STREQUAL "gnutls")
diff --git a/src/lib/emile/CMakeLists.txt b/src/lib/emile/CMakeLists.txt
index 559f7355b6..d6c315521a 100644
--- a/src/lib/emile/CMakeLists.txt
+++ b/src/lib/emile/CMakeLists.txt
@@ -8,6 +8,7 @@ set(PKG_CONFIG_REQUIRES_PRIVATE
8set(LIBRARIES 8set(LIBRARIES
9 eina 9 eina
10 m 10 m
11 support-rg_etc
11) 12)
12 13
13set(PUBLIC_HEADERS 14set(PUBLIC_HEADERS
@@ -24,14 +25,6 @@ set(SOURCES
24 emile_image.c 25 emile_image.c
25 emile_main.c 26 emile_main.c
26 emile_private.h 27 emile_private.h
27 ${CMAKE_SOURCE_DIR}/src/static_libs/rg_etc/etc2_encoder.c
28 ${CMAKE_SOURCE_DIR}/src/static_libs/rg_etc/rg_etc1.c
29 ${CMAKE_SOURCE_DIR}/src/static_libs/rg_etc/rg_etc1.h
30 ${CMAKE_SOURCE_DIR}/src/static_libs/rg_etc/rg_etc2.c
31)
32
33set(INCLUDE_DIRECTORIES
34 ${CMAKE_SOURCE_DIR}/src/static_libs/rg_etc
35) 28)
36 29
37if(WITH_CRYPTO STREQUAL "gnutls") 30if(WITH_CRYPTO STREQUAL "gnutls")
@@ -47,11 +40,5 @@ endif()
47if(WITH_LZ4 STREQUAL "system") 40if(WITH_LZ4 STREQUAL "system")
48 list(APPEND PKG_CONFIG_REQUIRES_PRIVATE liblz4) 41 list(APPEND PKG_CONFIG_REQUIRES_PRIVATE liblz4)
49else() 42else()
50 list(APPEND SOURCES 43 list(APPEND LIBRARIES support-lz4)
51 ${CMAKE_SOURCE_DIR}/src/static_libs/lz4/lz4.c
52 ${CMAKE_SOURCE_DIR}/src/static_libs/lz4/lz4.h
53 ${CMAKE_SOURCE_DIR}/src/static_libs/lz4/lz4hc.c
54 ${CMAKE_SOURCE_DIR}/src/static_libs/lz4/lz4hc.h
55 )
56 list(APPEND INCLUDE_DIRECTORIES ${CMAKE_SOURCE_DIR}/src/static_libs/lz4)
57endif() 44endif()
diff --git a/src/static_libs/draw/CMakeLists.txt b/src/static_libs/draw/CMakeLists.txt
new file mode 100644
index 0000000000..b2ad0041dc
--- /dev/null
+++ b/src/static_libs/draw/CMakeLists.txt
@@ -0,0 +1,17 @@
1set(LIBRARIES
2 eina
3)
4
5set(SOURCES
6 draw_main.c
7 draw_main_neon.c
8 draw_main_sse2.c
9)
10
11set(INCLUDE_DIRECTORIES
12 ${CMAKE_BINARY_DIR}/src/lib
13)
14
15set(DEPENDENCIES
16 efl-eo
17)
diff --git a/src/static_libs/draw/draw.h b/src/static_libs/draw/draw.h
index b63b73d2e0..9f4089aba0 100644
--- a/src/static_libs/draw/draw.h
+++ b/src/static_libs/draw/draw.h
@@ -5,7 +5,8 @@
5# include <config.h> 5# include <config.h>
6#endif 6#endif
7 7
8#include <Efl.h> 8#include <Eina.h>
9#include "efl/interfaces/efl_gfx_types.eot.h"
9 10
10/* FIXME: naming convention */ 11/* FIXME: naming convention */
11typedef void (*RGBA_Comp_Func) (uint32_t *dest, const uint32_t *src, int length, uint32_t mul_col, uint32_t const_alpha); 12typedef void (*RGBA_Comp_Func) (uint32_t *dest, const uint32_t *src, int length, uint32_t mul_col, uint32_t const_alpha);
diff --git a/src/static_libs/draw/draw_main.c b/src/static_libs/draw/draw_main.c
index 40b32e99da..8577beacce 100644
--- a/src/static_libs/draw/draw_main.c
+++ b/src/static_libs/draw/draw_main.c
@@ -2,7 +2,6 @@
2#include "config.h" 2#include "config.h"
3#endif 3#endif
4 4
5#include <Ector.h>
6#include "draw_private.h" 5#include "draw_private.h"
7 6
8int _draw_log_dom = -1; 7int _draw_log_dom = -1;
diff --git a/src/static_libs/draw/draw_main_sse2.c b/src/static_libs/draw/draw_main_sse2.c
index e8f934055b..58ed7a3c12 100644
--- a/src/static_libs/draw/draw_main_sse2.c
+++ b/src/static_libs/draw/draw_main_sse2.c
@@ -2,7 +2,6 @@
2#include "config.h" 2#include "config.h"
3#endif 3#endif
4 4
5#include <Ector.h>
6#include "draw_private.h" 5#include "draw_private.h"
7 6
8#ifdef BUILD_SSE3 7#ifdef BUILD_SSE3
diff --git a/src/static_libs/freetype/CMakeLists.txt b/src/static_libs/freetype/CMakeLists.txt
new file mode 100644
index 0000000000..5f669df285
--- /dev/null
+++ b/src/static_libs/freetype/CMakeLists.txt
@@ -0,0 +1,5 @@
1set(SOURCES
2 sw_ft_math.c
3 sw_ft_raster.c
4 sw_ft_stroker.c
5)
diff --git a/src/static_libs/lz4/CMakeLists.txt b/src/static_libs/lz4/CMakeLists.txt
new file mode 100644
index 0000000000..29bdb2032f
--- /dev/null
+++ b/src/static_libs/lz4/CMakeLists.txt
@@ -0,0 +1,6 @@
1set(SOURCES
2 lz4.c
3 lz4.h
4 lz4hc.c
5 lz4hc.h
6)
diff --git a/src/static_libs/rg_etc/CMakeLists.txt b/src/static_libs/rg_etc/CMakeLists.txt
new file mode 100644
index 0000000000..2511bc1837
--- /dev/null
+++ b/src/static_libs/rg_etc/CMakeLists.txt
@@ -0,0 +1,10 @@
1set(LIBRARIES
2 eina
3)
4
5set(SOURCES
6 etc2_encoder.c
7 rg_etc1.c
8 rg_etc1.h
9 rg_etc2.c
10)
diff --git a/src/static_libs/triangulator/CMakeLists.txt b/src/static_libs/triangulator/CMakeLists.txt
new file mode 100644
index 0000000000..78185589df
--- /dev/null
+++ b/src/static_libs/triangulator/CMakeLists.txt
@@ -0,0 +1,18 @@
1set(LIBRARIES
2 eina
3)
4
5set(SOURCES
6 triangulator_simple.c
7 triangulator_simple.h
8 triangulator_stroker.c
9 triangulator_stroker.h
10)
11
12set(INCLUDE_DIRECTORIES
13 ${CMAKE_BINARY_DIR}/src/lib
14)
15
16set(DEPENDENCIES
17 efl-eo
18)
diff --git a/src/static_libs/triangulator/triangulator_simple.h b/src/static_libs/triangulator/triangulator_simple.h
index e87acc6e40..e0c41f6255 100644
--- a/src/static_libs/triangulator/triangulator_simple.h
+++ b/src/static_libs/triangulator/triangulator_simple.h
@@ -1,7 +1,9 @@
1#ifndef TRIANGULATOR_SIMPLE_H_ 1#ifndef TRIANGULATOR_SIMPLE_H_
2#define TRIANGULATOR_SIMPLE_H_ 2#define TRIANGULATOR_SIMPLE_H_
3 3
4#include <Efl.h> 4#include <Eina.h>
5#include "efl/interfaces/efl_gfx_types.eot.h"
6typedef Efl_Gfx_Path_Command_Type Efl_Gfx_Path_Command;
5 7
6typedef struct _Triangulator_Simple Triangulator_Simple; 8typedef struct _Triangulator_Simple Triangulator_Simple;
7struct _Triangulator_Simple 9struct _Triangulator_Simple
@@ -40,4 +42,4 @@ void triangulator_simple_free(Triangulator_Simple *st);
40 */ 42 */
41void triangulator_simple_process(Triangulator_Simple *st, const Efl_Gfx_Path_Command *cmds, const double *pts, Eina_Bool convex); 43void triangulator_simple_process(Triangulator_Simple *st, const Efl_Gfx_Path_Command *cmds, const double *pts, Eina_Bool convex);
42 44
43#endif // #endif // TRIANGULATOR_SIMPLE_H_ \ No newline at end of file 45#endif // #endif // TRIANGULATOR_SIMPLE_H_
diff --git a/src/static_libs/triangulator/triangulator_stroker.h b/src/static_libs/triangulator/triangulator_stroker.h
index 5cc7805638..2dee4290e4 100644
--- a/src/static_libs/triangulator/triangulator_stroker.h
+++ b/src/static_libs/triangulator/triangulator_stroker.h
@@ -1,7 +1,9 @@
1#ifndef TRIANGULATOR_STROKER_H_ 1#ifndef TRIANGULATOR_STROKER_H_
2#define TRIANGULATOR_STROKER_H_ 2#define TRIANGULATOR_STROKER_H_
3 3
4#include <Efl.h> 4#include <Eina.h>
5#include "efl/interfaces/efl_gfx_types.eot.h"
6typedef Efl_Gfx_Path_Command_Type Efl_Gfx_Path_Command;
5 7
6typedef struct _Triangulator_Stroker Triangulator_Stroker; 8typedef struct _Triangulator_Stroker Triangulator_Stroker;
7struct _Triangulator_Stroker 9struct _Triangulator_Stroker