summaryrefslogtreecommitdiff
path: root/src/lib
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/lib
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/lib')
-rw-r--r--src/lib/ector/CMakeLists.txt29
-rw-r--r--src/lib/eet/CMakeLists.txt9
-rw-r--r--src/lib/emile/CMakeLists.txt17
3 files changed, 7 insertions, 48 deletions
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()