include(${CMAKE_SOURCE_DIR}/cmake/config/common.cmake)
+EFL_SUPPORT_LIB(lz4)
+EFL_SUPPORT_LIB(draw)
+EFL_SUPPORT_LIB(freetype)
+EFL_SUPPORT_LIB(rg_etc)
+EFL_SUPPORT_LIB(triangulator)
+
EFL_LIB(eina)
EFL_LIB(eolian)
EFL_LIB(eo)
BRIEF_DOCS "EFL's .eo/.eot files associated with this target and installed"
FULL_DOCS "The list of all .eo or .eot files this target uses and installs")
+# EFL_SUPPORT_LIB(Name)
+#
+# adds a support library as src/static_libs/${Name}, this will
+# generate a static library that can be later referred by other
+# targets using support-${Name}
+#
+# This is simiar to EFL_LIB(), however defaults to STATIC libraries
+# and if set to SHARED will install to
+# lib/efl/support/v-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
+# and it shouldn't set any PUBLIC_HEADERS or PKG_CONFIG_REQUIRES.
+function(EFL_SUPPORT_LIB _target)
+ set(EFL_LIB_CURRENT ${_target})
+ set(EFL_LIB_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/static_libs/${_target})
+ set(EFL_LIB_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/src/static_libs/${_target})
+
+ set(DESCRIPTION)
+ set(PKG_CONFIG_REQUIRES)
+ set(PKG_CONFIG_REQUIRES_PRIVATE)
+ set(INCLUDE_DIRECTORIES)
+ set(SYSTEM_INCLUDE_DIRECTORIES)
+ set(OUTPUT_NAME)
+ set(SOURCES)
+ set(PUBLIC_HEADERS)
+ set(VERSION)
+ set(SOVERSION)
+ set(LIBRARY_TYPE STATIC)
+ set(OBJECT_DEPENDS)
+ set(DEPENDENCIES)
+ set(LIBRARIES)
+ set(PUBLIC_LIBRARIES)
+ set(DEFINITIONS)
+ set(COMPILE_FLAGS)
+ set(LINK_FLAGS)
+
+ include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/config/${_target}.cmake OPTIONAL)
+ include(${EFL_LIB_SOURCE_DIR}/CMakeLists.txt)
+
+ if(NOT SOURCES)
+ message(WARNING "${EFL_LIB_SOURCE_DIR}/CMakeLists.txt defines no SOURCES")
+ return()
+ endif()
+ if(PUBLIC_HEADERS)
+ message(WARNING "${EFL_LIB_SOURCE_DIR}/CMakeLists.txt should not define PUBLIC_HEADERS, it's not to be installed.")
+ endif()
+ if(PKG_CONFIG_REQUIRES)
+ message(WARNING "${EFL_LIB_SOURCE_DIR}/CMakeLists.txt should not define PKG_CONFIG_REQUIRES. Use PKG_CONFIG_REQUIRES_PRIVATE instead")
+ endif()
+
+ EFL_FILES_TO_ABSOLUTE(_sources ${EFL_LIB_SOURCE_DIR} ${EFL_LIB_BINARY_DIR}
+ ${SOURCES})
+ EFL_FILES_TO_ABSOLUTE(_obj_deps ${EFL_LIB_SOURCE_DIR} ${EFL_LIB_BINARY_DIR}
+ ${OBJECT_DEPENDS})
+
+ EFL_PKG_CONFIG_EVAL(${_target} "${PKG_CONFIG_REQUIRES_PRIVATE}" "${PKG_CONFIG_REQUIRES}")
+
+ set(__link_flags ${${_target}_PKG_CONFIG_REQUIRES_PRIVATE_LDFLAGS} ${${_target}_PKG_CONFIG_REQUIRES_LDFLAGS} ${LINK_FLAGS})
+ set(__compile_flags ${${_target}_PKG_CONFIG_REQUIRES_PRIVATE_CFLAGS} ${${_target}_PKG_CONFIG_REQUIRES_CFLAGS} ${COMPILE_FLAGS})
+
+ set(_link_flags)
+ foreach(_l ${__link_flags})
+ set(_link_flags "${_link_flags} ${_l}")
+ endforeach()
+
+ set(_compile_flags)
+ foreach(_c ${__compile_flags})
+ set(_compile_flags "${_compile_flags} ${_c}")
+ endforeach()
+
+ add_library(support-${_target} ${LIBRARY_TYPE} ${_sources} ${_headers})
+ set_target_properties(support-${_target} PROPERTIES
+ OBJECT_DEPENDS "${_obj_deps}"
+ LINK_FLAGS "${_link_flags}"
+ COMPILE_FLAGS "${_compile_flags}")
+
+ if(DEPENDENCIES)
+ add_dependencies(support-${_target} ${DEPENDENCIES})
+ endif()
+
+ if(LIBRARIES)
+ target_link_libraries(support-${_target} LINK_PRIVATE ${LIBRARIES})
+ endif()
+ if(PUBLIC_LIBRARIES)
+ target_link_libraries(support-${_target} PUBLIC ${PUBLIC_LIBRARIES})
+ endif()
+
+ target_include_directories(support-${_target} PUBLIC
+ ${INCLUDE_DIRECTORIES}
+ ${EFL_LIB_SOURCE_DIR}
+ ${EFL_LIB_BINARY_DIR}
+ )
+ if(SYSTEM_INCLUDE_DIRECTORIES)
+ target_include_directories(support-${_target} SYSTEM PUBLIC ${SYSTEM_INCLUDE_DIRECTORIES})
+ endif()
+
+ if(DEFINITIONS)
+ target_compile_definitions(support-${_target} PRIVATE ${DEFINITIONS})
+ endif()
+
+ if(OUTPUT_NAME)
+ set_target_properties(support-${_target} PROPERTIES OUTPUT_NAME ${OUTPUT_NAME})
+ endif()
+
+ if(VERSION AND SOVERSION)
+ set_target_properties(support-${_target} PROPERTIES
+ VERSION ${VERSION}
+ SOVERSION ${SOVERSION})
+ endif()
+
+ if(LIBRARY_TYPE STREQUAL "SHARED")
+ install(TARGETS support-${_target}
+ RUNTIME DESTINATION lib/efl/support/v-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
+ LIBRARY DESTINATION lib/efl/support/v-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR})
+ else()
+ set_target_properties(support-${_target} PROPERTIES
+ POSITION_INDEPENDENT_CODE TRUE)
+ endif()
+
+ include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/post/${_target}.cmake OPTIONAL)
+endfunction()
+
# EFL_LIB(Name)
#
# adds a library ${Name} automatically setting object/target
@sh $(srcdir)/lib/ector/gl/shader/gen_shaders.sh
lib_ector_libector_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
+-I$(top_builddir)/src/lib \
-I$(top_builddir)/src/lib/ector \
-I$(top_builddir)/src/lib/ector/cairo \
-I$(top_builddir)/src/lib/ector/software \
-I$(top_srcdir)/src/lib/evas/include \
-I$(top_srcdir)/src/static_libs/libunibreak \
-I$(top_srcdir)/src/static_libs/draw \
+-I$(top_builddir)/src/lib \
-I$(top_builddir)/src/lib/evas/canvas \
-I$(top_builddir)/src/lib/evas/include \
-I$(top_builddir)/src/modules/evas/engines/software_generic \
efl
emile
m
+ support-draw
+ support-freetype
+ support-rg_etc
+ support-triangulator
)
set(PUBLIC_LIBRARIES
software/ector_software_gradient.c
software/ector_software_rasterizer.c
software/ector_software_surface.c
-
- ${CMAKE_SOURCE_DIR}/src/static_libs/draw/draw_main.c
- ${CMAKE_SOURCE_DIR}/src/static_libs/draw/draw_main_neon.c
- ${CMAKE_SOURCE_DIR}/src/static_libs/draw/draw_main_sse2.c
-
- ${CMAKE_SOURCE_DIR}/src/static_libs/freetype/sw_ft_math.c
- ${CMAKE_SOURCE_DIR}/src/static_libs/freetype/sw_ft_raster.c
- ${CMAKE_SOURCE_DIR}/src/static_libs/freetype/sw_ft_stroker.c
-
- ${CMAKE_SOURCE_DIR}/src/static_libs/rg_etc/etc2_encoder.c
- ${CMAKE_SOURCE_DIR}/src/static_libs/rg_etc/rg_etc1.c
- ${CMAKE_SOURCE_DIR}/src/static_libs/rg_etc/rg_etc1.h
- ${CMAKE_SOURCE_DIR}/src/static_libs/rg_etc/rg_etc2.c
-
- ${CMAKE_SOURCE_DIR}/src/static_libs/triangulator/triangulator_simple.c
- ${CMAKE_SOURCE_DIR}/src/static_libs/triangulator/triangulator_simple.h
- ${CMAKE_SOURCE_DIR}/src/static_libs/triangulator/triangulator_stroker.c
- ${CMAKE_SOURCE_DIR}/src/static_libs/triangulator/triangulator_stroker.h
-)
-
-set(INCLUDE_DIRECTORIES
- ${CMAKE_SOURCE_DIR}/src/static_libs/draw
- ${CMAKE_SOURCE_DIR}/src/static_libs/freetype
- ${CMAKE_SOURCE_DIR}/src/static_libs/rg_etc
- ${CMAKE_SOURCE_DIR}/src/static_libs/triangulator
)
add_custom_command(
set(LIBRARIES
m
+ support-rg_etc
)
set(PUBLIC_HEADERS
eet_node.c
Eet_private.h
eet_utils.c
- ${CMAKE_SOURCE_DIR}/src/static_libs/rg_etc/rg_etc1.c
- ${CMAKE_SOURCE_DIR}/src/static_libs/rg_etc/rg_etc2.c
- ${CMAKE_SOURCE_DIR}/src/static_libs/rg_etc/etc2_encoder.c
- ${CMAKE_SOURCE_DIR}/src/static_libs/rg_etc/rg_etc1.h
-)
-
-set(INCLUDE_DIRECTORIES
- ${CMAKE_SOURCE_DIR}/src/static_libs/rg_etc
)
if(WITH_CRYPTO STREQUAL "gnutls")
set(LIBRARIES
eina
m
+ support-rg_etc
)
set(PUBLIC_HEADERS
emile_image.c
emile_main.c
emile_private.h
- ${CMAKE_SOURCE_DIR}/src/static_libs/rg_etc/etc2_encoder.c
- ${CMAKE_SOURCE_DIR}/src/static_libs/rg_etc/rg_etc1.c
- ${CMAKE_SOURCE_DIR}/src/static_libs/rg_etc/rg_etc1.h
- ${CMAKE_SOURCE_DIR}/src/static_libs/rg_etc/rg_etc2.c
-)
-
-set(INCLUDE_DIRECTORIES
- ${CMAKE_SOURCE_DIR}/src/static_libs/rg_etc
)
if(WITH_CRYPTO STREQUAL "gnutls")
if(WITH_LZ4 STREQUAL "system")
list(APPEND PKG_CONFIG_REQUIRES_PRIVATE liblz4)
else()
- list(APPEND SOURCES
- ${CMAKE_SOURCE_DIR}/src/static_libs/lz4/lz4.c
- ${CMAKE_SOURCE_DIR}/src/static_libs/lz4/lz4.h
- ${CMAKE_SOURCE_DIR}/src/static_libs/lz4/lz4hc.c
- ${CMAKE_SOURCE_DIR}/src/static_libs/lz4/lz4hc.h
- )
- list(APPEND INCLUDE_DIRECTORIES ${CMAKE_SOURCE_DIR}/src/static_libs/lz4)
+ list(APPEND LIBRARIES support-lz4)
endif()
--- /dev/null
+set(LIBRARIES
+ eina
+)
+
+set(SOURCES
+ draw_main.c
+ draw_main_neon.c
+ draw_main_sse2.c
+)
+
+set(INCLUDE_DIRECTORIES
+ ${CMAKE_BINARY_DIR}/src/lib
+)
+
+set(DEPENDENCIES
+ efl-eo
+)
# include <config.h>
#endif
-#include <Efl.h>
+#include <Eina.h>
+#include "efl/interfaces/efl_gfx_types.eot.h"
/* FIXME: naming convention */
typedef void (*RGBA_Comp_Func) (uint32_t *dest, const uint32_t *src, int length, uint32_t mul_col, uint32_t const_alpha);
#include "config.h"
#endif
-#include <Ector.h>
#include "draw_private.h"
int _draw_log_dom = -1;
#include "config.h"
#endif
-#include <Ector.h>
#include "draw_private.h"
#ifdef BUILD_SSE3
--- /dev/null
+set(SOURCES
+ sw_ft_math.c
+ sw_ft_raster.c
+ sw_ft_stroker.c
+)
--- /dev/null
+set(SOURCES
+ lz4.c
+ lz4.h
+ lz4hc.c
+ lz4hc.h
+)
--- /dev/null
+set(LIBRARIES
+ eina
+)
+
+set(SOURCES
+ etc2_encoder.c
+ rg_etc1.c
+ rg_etc1.h
+ rg_etc2.c
+)
--- /dev/null
+set(LIBRARIES
+ eina
+)
+
+set(SOURCES
+ triangulator_simple.c
+ triangulator_simple.h
+ triangulator_stroker.c
+ triangulator_stroker.h
+)
+
+set(INCLUDE_DIRECTORIES
+ ${CMAKE_BINARY_DIR}/src/lib
+)
+
+set(DEPENDENCIES
+ efl-eo
+)
#ifndef TRIANGULATOR_SIMPLE_H_
#define TRIANGULATOR_SIMPLE_H_
-#include <Efl.h>
+#include <Eina.h>
+#include "efl/interfaces/efl_gfx_types.eot.h"
+typedef Efl_Gfx_Path_Command_Type Efl_Gfx_Path_Command;
typedef struct _Triangulator_Simple Triangulator_Simple;
struct _Triangulator_Simple
*/
void triangulator_simple_process(Triangulator_Simple *st, const Efl_Gfx_Path_Command *cmds, const double *pts, Eina_Bool convex);
-#endif // #endif // TRIANGULATOR_SIMPLE_H_
\ No newline at end of file
+#endif // #endif // TRIANGULATOR_SIMPLE_H_
#ifndef TRIANGULATOR_STROKER_H_
#define TRIANGULATOR_STROKER_H_
-#include <Efl.h>
+#include <Eina.h>
+#include "efl/interfaces/efl_gfx_types.eot.h"
+typedef Efl_Gfx_Path_Command_Type Efl_Gfx_Path_Command;
typedef struct _Triangulator_Stroker Triangulator_Stroker;
struct _Triangulator_Stroker