summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <marcel@osg.samsung.com>2017-12-12 11:22:47 +0100
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2018-12-20 20:07:26 +0100
commite43f090265f0e42dc1a6d9f2691e0b84971209fa (patch)
tree2f7ab6e18a10b7a4363f53fb270997f07f07cb31
parent6fcc3a56d84901ad077a801567a590451263078d (diff)
cmake: remove!
This build was never complete and also was not maintained probebly. It is also dropped in favour of meson which is cool, merged, works & is fast. Differential Revision: https://phab.enlightenment.org/D7010
-rw-r--r--CMakeLists.txt70
-rw-r--r--TODO-cmake.txt67
-rw-r--r--cmake/config/common.cmake124
-rw-r--r--cmake/config/ecore.cmake42
-rw-r--r--cmake/config/ecore_con.cmake14
-rw-r--r--cmake/config/ecore_x.cmake110
-rw-r--r--cmake/config/eeze.cmake24
-rw-r--r--cmake/config/eina.cmake80
-rw-r--r--cmake/config/eldbus.cmake1
-rw-r--r--cmake/config/emile.cmake10
-rw-r--r--cmake/config/eo.cmake3
-rw-r--r--cmake/config/eolian.cmake1
-rw-r--r--cmake/helpers/EflMacros.cmake1790
-rw-r--r--cmake/post/eina.cmake27
-rw-r--r--src/CMakeLists.txt2
-rw-r--r--src/CMakeLists_Eina.txt11
-rw-r--r--src/bin/ecore_con/CMakeLists.txt10
-rw-r--r--src/bin/eeze/eeze_mount/CMakeLists.txt7
-rw-r--r--src/bin/eeze/eeze_scanner/CMakeLists.txt10
-rw-r--r--src/bin/eeze/eeze_scanner_monitor/CMakeLists.txt9
-rw-r--r--src/bin/eeze/eeze_sensor_test/CMakeLists.txt7
-rw-r--r--src/bin/eeze/eeze_umount/CMakeLists.txt9
-rw-r--r--src/bin/eldbus/CMakeLists.txt15
-rw-r--r--src/bin/embryo/CMakeLists.txt24
-rw-r--r--src/bin/eolian/CMakeLists.txt19
-rw-r--r--src/lib/CMakeLists.txt1
-rw-r--r--src/lib/ecore/CMakeLists.txt104
-rw-r--r--src/lib/ecore_con/CMakeLists.txt133
-rw-r--r--src/lib/ecore_file/CMakeLists.txt29
-rw-r--r--src/lib/ecore_input/CMakeLists.txt22
-rw-r--r--src/lib/ecore_ipc/CMakeLists.txt19
-rw-r--r--src/lib/ecore_x/CMakeLists.txt61
-rw-r--r--src/lib/ector/CMakeLists.txt119
-rw-r--r--src/lib/eet/CMakeLists.txt39
-rw-r--r--src/lib/eeze/CMakeLists.txt67
-rw-r--r--src/lib/efl/CMakeLists.txt93
-rw-r--r--src/lib/eina/CMakeLists.txt176
-rw-r--r--src/lib/eldbus/CMakeLists.txt70
-rw-r--r--src/lib/embryo/CMakeLists.txt21
-rw-r--r--src/lib/emile/CMakeLists.txt45
-rw-r--r--src/lib/eo/CMakeLists.txt29
-rw-r--r--src/lib/eolian/CMakeLists.txt46
-rw-r--r--src/modules/ecore/system/systemd/CMakeLists.txt7
-rw-r--r--src/modules/ecore/system/tizen/CMakeLists.txt3
-rw-r--r--src/modules/ecore/system/upower/CMakeLists.txt7
-rw-r--r--src/modules/eina/mp/chained_pool/CMakeLists.txt5
-rw-r--r--src/modules/eina/mp/one_big/CMakeLists.txt5
-rw-r--r--src/modules/eina/mp/pass_through/CMakeLists.txt5
-rw-r--r--src/static_libs/draw/CMakeLists.txt17
-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/tests/ecore_con/CMakeLists.txt13
-rw-r--r--src/tests/ector/suite/CMakeLists.txt5
-rw-r--r--src/tests/eet/CMakeLists.txt14
-rw-r--r--src/tests/eeze/CMakeLists.txt12
-rw-r--r--src/tests/eina/CMakeLists.txt66
-rw-r--r--src/tests/eldbus/CMakeLists.txt25
-rw-r--r--src/tests/emile/CMakeLists.txt10
-rw-r--r--src/tests/eo/access/CMakeLists.txt13
-rw-r--r--src/tests/eo/children/CMakeLists.txt9
-rw-r--r--src/tests/eo/composite_objects/CMakeLists.txt11
-rw-r--r--src/tests/eo/constructors/CMakeLists.txt23
-rw-r--r--src/tests/eo/function_overrides/CMakeLists.txt15
-rw-r--r--src/tests/eo/interface/CMakeLists.txt14
-rw-r--r--src/tests/eo/mixin/CMakeLists.txt19
-rw-r--r--src/tests/eo/signals/CMakeLists.txt9
-rw-r--r--src/tests/eo/suite/CMakeLists.txt24
-rw-r--r--src/tests/eolian/CMakeLists.txt19
70 files changed, 0 insertions, 3949 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
deleted file mode 100644
index 48c890e..0000000
--- a/CMakeLists.txt
+++ /dev/null
@@ -1,70 +0,0 @@
1cmake_minimum_required(VERSION 3.4)
2
3set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/helpers")
4
5include(GNUInstallDirs)
6include(EflMacros)
7
8EFL_PROJECT(1.18.99)
9
10if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
11 message(FATAL_ERROR "In-source builds not allowed. Use: mkdir -p build && cmake -H. -Bbuild")
12endif()
13
14set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}" CACHE PATH "Path to store built libraries")
15set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}" CACHE PATH "Path to store built static libraries")
16set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin" CACHE PATH "Path to store built executables")
17
18add_definitions(
19 "-DHAVE_CONFIG_H"
20 "-DLIB_INSTALL_DIR=\"${LIB_INSTALL_DIR}\""
21 "-DEXEC_INSTALL_DIR=\"${EXEC_INSTALL_DIR}\""
22 "-DPACKAGE_BIN_DIR=\"${CMAKE_INSTALL_FULL_BINDIR}\""
23 "-DPACKAGE_LIB_DIR=\"${CMAKE_INSTALL_FULL_LIBDIR}\""
24 "-DPACKAGE_BUILD_DIR=\"${CMAKE_SOURCE_DIR}\""
25 "-DPACKAGE_VERSION=\"${PROJECT_VERSION}\""
26 )
27
28include_directories(
29 ${PROJECT_SOURCE_DIR}/src/lib/efl
30 ${PROJECT_BINARY_DIR}/src/lib/efl
31 )
32
33include(${CMAKE_SOURCE_DIR}/cmake/config/common.cmake)
34
35EFL_SUPPORT_LIB(lz4)
36EFL_SUPPORT_LIB(draw)
37EFL_SUPPORT_LIB(freetype)
38EFL_SUPPORT_LIB(rg_etc)
39EFL_SUPPORT_LIB(triangulator)
40
41EFL_LIB(eina)
42EFL_LIB(eolian)
43EFL_LIB(eo)
44EFL_LIB(efl)
45EFL_LIB(emile)
46EFL_LIB(eet)
47EFL_LIB(ecore)
48EFL_LIB(ecore_con)
49EFL_LIB(ecore_ipc)
50EFL_LIB(ecore_file)
51EFL_LIB(eldbus)
52EFL_LIB(embryo)
53EFL_LIB(ector)
54EFL_LIB(eeze)
55EFL_LIB(ecore_input)
56EFL_LIB(ecore_x)
57
58EFL_OPTIONS_SUMMARY()
59
60# TODO: when autotools is gone, rename this file in repository
61# and remove this copy (using generate to skip @-subst)
62file(GENERATE
63 OUTPUT ${PROJECT_BINARY_DIR}/src/lib/efl/config.h
64 INPUT ${PROJECT_SOURCE_DIR}/src/lib/efl/config.h.cmake)
65EFL_HEADER_CHECKS_FINALIZE(${PROJECT_BINARY_DIR}/src/lib/efl/config_gen.h)
66
67configure_file(
68 ${PROJECT_SOURCE_DIR}/src/lib/efl/Efl_Config.h.cmake
69 ${PROJECT_BINARY_DIR}/src/lib/efl/Efl_Config.h)
70EFL_FINALIZE()
diff --git a/TODO-cmake.txt b/TODO-cmake.txt
deleted file mode 100644
index 2cb522f..0000000
--- a/TODO-cmake.txt
+++ /dev/null
@@ -1,67 +0,0 @@
1Help Cmake build system come true by helping with the following
2tasks. Most of them can be done on top of autotools only, then we'll
3catch-up with the cmake parts.
4
5General (non-CMake specific) Tasks:
6
7 - move each target (binary, lib, test) to its own directory, example:
8 src/lib/efreet contains efreet_mime and efreet_trash in addition to
9 efreet. Create src/lib/efreet_mime and src/lib/efreet_trash.
10
11 It also applies to tests (ie: src/tests/ector which contains both
12 ector_suite and cxx_compile_test), in the case of binaries and
13 tests make sure to contain them in the library folder:
14 src/tests/ector should then contain 2 folders, one for each
15 test. Another one is src/tests/eo, which contains lots of
16 stand-alone tests in addition to eo_suite.
17
18 - uniform installation (and lookup!) of modules, like
19 lib/evas/modules/engines/NAME/v-1.18/module.so versus
20 lib/ecore/system/NAME/v-1.18/module.so (missing 'modules/')
21 lib/ecore_evas/engines/NAME/v-1.18/module.so (missing 'modules/')
22
23 - uniform module enable variables:
24 {LIB}_MODULE_TYPE_{SCOPE}_{MODNAME}_STATIC (static/built-in, with scope)
25 {LIB}_MODULE_TYPE_{SCOPE}_{MODNAME}_DYNAMIC (dynamic, with scope)
26 {LIB}_MODULE_TYPE_{MODNAME}_STATIC (static/built-in, no scope)
27 {LIB}_MODULE_TYPE_{MODNAME}_DYNAMIC (dynamic, no scope)
28 Example:
29 EINA_MODULE_TYPE_MP_PASS_THROUGH_STATIC
30 instead of EINA_STATIC_BUILD_PASS_THROUGH
31 EVAS_MODULE_TYPE_ENGINE_FB
32 instead of EVAS_STATIC_BUILD_FB
33 As this will make clear we're dealing with modules and their scope
34 (if any, things like Ecore_IMF have no module scope).
35
36
37CMake Tasks:
38
39 - add src/lib/NAME/CMakeLists.txt defining SOURCES, PUBLIC_HEADERS,
40 PKG_CONFIG_REQUIRES, PKG_CONFIG_REQUIRES_PRIVATE, LIBRARIES,
41 PUBLIC_LIBRARIES and so on. See src/lib/eina/CMakeLists.txt as an
42 example.
43
44 - add options and dependency detection to cmake/config/NAME.cmake,
45 see cmake/config/eina.cmake and cmake/config/common.cmake
46
47 - add src/modules/NAME/SCOPE/MODNAME/CMakeLists.txt or
48 src/modules/NAME/MODNAME/CMakeLists.txt (if no module scope). If
49 single source and no special requiresments (libs, etc), then it
50 should require no CMakeLists.txt and will be built automatically.
51
52 - add src/bin/NAME/CMakeLists.txt (single binary of a lib) or
53 src/bin/NAME/EXE_NAME/CMakeLists.txt (multiple binaries for a lib).
54 If single source (one .c), then no CMakeLists.txt should be needed,
55 see if it's already being built.
56
57 - add src/tests/NAME/CMakeLists.txt (single test of a lib) or
58 src/tests/NAME/EXE_NAME/CMakeLists.txt (multiple tests for a lib).
59 If single source (one .c), then no CMakeLists.txt should be needed,
60 see if it's already being built.
61
62Since it's under development, check the code in cmake/helpers/*.cmake,
63in particular cmake/helpers/EflMacros.cmake and check the comments and
64also fix bugs :-)
65
66Feedback on repetitive tasks and if you spot some
67unification/simplification/automatization.
diff --git a/cmake/config/common.cmake b/cmake/config/common.cmake
deleted file mode 100644
index a4257eb..0000000
--- a/cmake/config/common.cmake
+++ /dev/null
@@ -1,124 +0,0 @@
1include(CheckSymbolExists)
2include(CheckIncludeFile)
3include(CheckTypeSize)
4include(FindPkgConfig)
5include(FindJPEG)
6include(CTest)
7find_package(Threads REQUIRED)
8
9pkg_check_modules(CHECK check)
10pkg_check_modules(LIBSYSTEMD libsystemd)
11pkg_check_modules(VALGRIND valgrind)
12pkg_check_modules(OPENSSL openssl>=1.0)
13pkg_check_modules(GNUTLS gnutls>=2.12.16)
14if (NOT JPEG_FOUND)
15 error("a jpeg library is needed.")
16endif()
17
18set(SUGGEST_VALGRIND OFF)
19if("${BUILD_PROFILE}" STREQUAL "dev")
20 set(SUGGEST_VALGRIND ${VALGRIND_FOUND})
21elseif("${BUILD_PROFILE}" STREQUAL "debug")
22 set(SUGGEST_VALGRIND ${VALGRIND_FOUND})
23endif()
24
25EFL_OPTION(BUILD_PROFILE "How to build EFL" dev CHOICE release;dev;debug)
26EFL_OPTION(EFL_NOLEGACY_API_SUPPORT "Whenever to disable non-Eo (Legacy) APIs" ON)
27EFL_OPTION(EFL_EO_API_SUPPORT "Whenever to enable new Eo APIs" ON)
28if(NOT EFL_EO_API_SUPPORT)
29 EFL_OPTION_SET_MESSAGE(EFL_EO_API_SUPPORT "Risky!")
30endif()
31
32EFL_OPTION_BACKEND(WITH_CRYPTO "Choose crypto backend" OPENSSL GNUTLS)
33
34EFL_OPTION(ENABLE_SYSTEMD "Enable systemd support" "${LIBSYSTEMD_FOUND}" DEPENDS "LIBSYSTEMD_FOUND" OFF)
35EFL_OPTION(ENABLE_VALGRIND "Enable valgrind support" "${SUGGEST_VALGRIND}" DEPENDS "VALGRIND_FOUND" OFF)
36
37# BEGIN: HEADER, TYPE and FUNCTION CHECKS
38# KEEP EACH BLOCK SORTED
39
40HEADER_CHECK(alloca.h)
41HEADER_CHECK(asm/hwcap.h)
42HEADER_CHECK(bsd/string.h)
43HEADER_CHECK(dirent.h)
44HEADER_CHECK(execinfo.h)
45HEADER_CHECK(mcheck.h)
46HEADER_CHECK(netinet/in.h)
47HEADER_CHECK(stdlib.h)
48HEADER_CHECK(sys/auxv.h)
49HEADER_CHECK(sys/inotify.h)
50HEADER_CHECK(sys/ioctl.h)
51HEADER_CHECK(sys/mman.h)
52HEADER_CHECK(sys/types.h)
53
54FUNC_CHECK(alloca INCLUDE_FILES alloca.h)
55FUNC_CHECK(backtrace INCLUDE_FILES execinfo.h)
56FUNC_CHECK(backtrace_symbols INCLUDE_FILES execinfo.h)
57FUNC_CHECK(clock_gettime INCLUDE_FILES time.h)
58FUNC_CHECK(dirfd INCLUDE_FILES dirent.h sys/types.h)
59FUNC_CHECK(dladdr INCLUDE_FILES dlfcn.h LIBRARIES dl DEFINITIONS "-D_GNU_SOURCE=1")
60FUNC_CHECK(dlopen INCLUDE_FILES dlfcn.h LIBRARIES dl)
61FUNC_CHECK(dlsym INCLUDE_FILES dlfcn.h LIBRARIES dl)
62FUNC_CHECK(fchmod INCLUDE_FILES sys/stat.h)
63FUNC_CHECK(fcntl INCLUDE_FILES fcntl.h)
64FUNC_CHECK(fork INCLUDE_FILES unistd.h)
65FUNC_CHECK(fpathconf INCLUDE_FILES unistd.h)
66FUNC_CHECK(fstatat NAME HAVE_ATFILE_SOURCE INCLUDE_FILES sys/stat.h)
67FUNC_CHECK(geteuid INCLUDE_FILES unistd.h)
68FUNC_CHECK(getpagesize INCLUDE_FILES unistd.h)
69FUNC_CHECK(getpwent INCLUDE_FILES sys/types.h pwd.h)
70FUNC_CHECK(getuid INCLUDE_FILES unistd.h)
71FUNC_CHECK(getxattr INCLUDE_FILES sys/types.h sys/xattr.h)
72FUNC_CHECK(iconv INCLUDE_FILES iconv.h)
73FUNC_CHECK(listxattr INCLUDE_FILES sys/types.h sys/xattr.h)
74FUNC_CHECK(lround INCLUDE_FILES math.h LIBRARIES m)
75FUNC_CHECK(mallinfo INCLUDE_FILES malloc.h)
76FUNC_CHECK(malloc_info INCLUDE_FILES malloc.h)
77FUNC_CHECK(malloc_usable_size INCLUDE_FILES malloc.h)
78FUNC_CHECK(mkdirat INCLUDE_FILES sys/stat.h)
79FUNC_CHECK(mmap INCLUDE_FILES sys/mman.h)
80FUNC_CHECK(mtrace INCLUDE_FILES mcheck.h)
81FUNC_CHECK(prctl INCLUDE_FILES sys/prctl.h)
82FUNC_CHECK(realpath INCLUDE_FILES stdlib.h)
83FUNC_CHECK(sched_getcpu INCLUDE_FILES sched.h DEFINITIONS "-D_GNU_SOURCE=1")
84FUNC_CHECK(setxattr INCLUDE_FILES sys/types.h sys/xattr.h)
85FUNC_CHECK(shm_open INCLUDE_FILES sys/mman.h sys/stat.h fcntl.h LIBRARIES rt)
86FUNC_CHECK(siglongjmp INCLUDE_FILES setjmp.h)
87FUNC_CHECK(splice INCLUDE_FILES fcntl.h DEFINITIONS "-D_GNU_SOURCE=1")
88FUNC_CHECK(strerror_r INCLUDE_FILES string.h)
89
90if(HAVE_BSD_STRING_H)
91 FUNC_CHECK(strlcpy INCLUDE_FILES bsd/string.h LIBRARIES bsd)
92else()
93 FUNC_CHECK(strlcpy INCLUDE_FILES string.h)
94endif()
95
96TYPE_CHECK(siginfo_t INCLUDE_FILES signal.h)
97
98# END: HEADER, TYPE and FUNCTION CHECKS
99
100# TODO: move to a FindUnwind.cmake?
101# or is pkg-config enough these days?
102pkg_check_modules(UNWIND libunwind libunwind-generic)
103
104CHECK_APPEND_DEFINE(EFL_EO_API_SUPPORT 1)
105CHECK_APPEND_DEFINE(EFL_BETA_API_SUPPORT 1)
106if(CMAKE_THREAD_LIBS_INIT)
107 set(EFL_HAVE_THREADS 1)
108endif()
109CHECK_APPEND_DEFINE(EFL_HAVE_THREADS "${EFL_HAVE_THREADS}")
110
111CHECK_APPEND_DEFINE(HAVE_CIPHER ${WITH_CRYPTO_ENABLED})
112CHECK_APPEND_DEFINE(HAVE_SIGNATURE ${WITH_CRYPTO_ENABLED})
113CHECK_APPEND_DEFINE(HAVE_SYSTEMD ${ENABLE_SYSTEMD})
114
115CHECK_APPEND_DEFINE(MODULE_ARCH "\"v-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}\"")
116CHECK_APPEND_DEFINE(SHARED_LIB_SUFFIX "\"${CMAKE_SHARED_LIBRARY_SUFFIX}\"")
117CHECK_APPEND_DEFINE(EXEEXT "\"${CMAKE_EXECUTABLE_SUFFIX}\"")
118
119# TODO: change code and remove:
120CHECK_APPEND_DEFINE(VMAJ ${PROJECT_VERSION_MAJOR})
121CHECK_APPEND_DEFINE(VMIN ${PROJECT_VERSION_MINOR})
122CHECK_APPEND_DEFINE(VMIC ${PROJECT_VERSION_PATCH})
123CHECK_APPEND_DEFINE(VREV ${PROJECT_VERSION_TWEAK})
124
diff --git a/cmake/config/ecore.cmake b/cmake/config/ecore.cmake
deleted file mode 100644
index c8cec4e..0000000
--- a/cmake/config/ecore.cmake
+++ /dev/null
@@ -1,42 +0,0 @@
1pkg_check_modules(GLIB glib-2.0)
2pkg_check_modules(TIZEN vconf)
3
4EFL_OPTION(ENABLE_GLIB "Whenever to integrate with Glib" ${GLIB_FOUND} DEPENDS GLIB_FOUND OFF)
5
6EFL_OPTION(ENABLE_GLIB_ALWAYS "Always integrate with Glib, otheriwse needs explicit call to ecore_main_loop_glib_integrate()" OFF DEPENDS "ENABLE_GLIB" OFF)
7
8EFL_OPTION(ENABLE_G_MAIN_LOOP "Enable ecore_main_loop based on g_main_loop" OFF DEPENDS "ENABLE_GLIB" OFF)
9
10EFL_OPTION(ENABLE_TIZEN "Enable tizen support" OFF DEPENDS "TIZEN_FOUND" OFF)
11
12set(ECORE_MODULE_TYPE_SYSTEM_SYSTEMD_DEFAULT ${ENABLE_SYSTEMD})
13set(ECORE_MODULE_TYPE_SYSTEM_UPOWER_DEFAULT ON)
14set(ECORE_MODULE_TYPE_SYSTEM_TIZEN_DEFAULT ${ENABLE_TIZEN})
15
16# TODO libuv
17# TODO gstreamer
18# TODO gstreamer1
19
20if("${BUILD_PROFILE}" STREQUAL "dev" AND HAVE_BACKTRACE)
21 CHECK_APPEND_DEFINE(WANT_ECORE_TIMER_DUMP 1)
22else()
23 CHECK_APPEND_DEFINE(WANT_ECORE_TIMER_DUMP "")
24endif()
25
26CHECK_APPEND_DEFINE(GLIB_INTEGRATION_ALWAYS "${ENABLE_GLIB_ALWAYS}")
27CHECK_APPEND_DEFINE(HAVE_GLIB "${ENABLE_GLIB}")
28CHECK_APPEND_DEFINE(HAVE_TIZEN_CONFIGURATION_MANAGER "${ENABLE_TIZEN}")
29CHECK_APPEND_DEFINE(USE_G_MAIN_LOOP "${ENABLE_G_MAIN_LOOP}")
30
31FUNC_CHECK(epoll_create NAME HAVE_EPOLL INCLUDE_FILES sys/epoll.h)
32FUNC_CHECK(execvp INCLUDE_FILES unistd.h)
33FUNC_CHECK(gettimeofday INCLUDE_FILES sys/time.h)
34FUNC_CHECK(isfinite INCLUDE_FILES math.h LIBRARIES m)
35FUNC_CHECK(pause INCLUDE_FILES unistd.h)
36FUNC_CHECK(timerfd_create INCLUDE_FILES sys/timerfd.h)
37
38HEADER_CHECK(ieeefp.h)
39HEADER_CHECK(langinfo.h)
40HEADER_CHECK(sys/epoll.h)
41HEADER_CHECK(sys/timerfd.h)
42HEADER_CHECK(sys/wait.h)
diff --git a/cmake/config/ecore_con.cmake b/cmake/config/ecore_con.cmake
deleted file mode 100644
index 487cb46..0000000
--- a/cmake/config/ecore_con.cmake
+++ /dev/null
@@ -1,14 +0,0 @@
1EFL_OPTION(WITH_EFL_NET_CONTROL_BACKEND "Choose the Efl.Net.Control backend" "connman" CHOICE connman;none)
2
3FUNC_CHECK(accept4 INCLUDE_FILES sys/types.h sys/socket.h DEFINITIONS "-D_GNU_SOURCE=1")
4FUNC_CHECK(gmtime_r INCLUDE_FILES time.h DEFINITIONS "-D_POSIX_C_SOURCE=1 -D_BSD_SOURCE=1 -D_SVID_SOURCE=1")
5
6HEADER_CHECK(arpa/inet.h)
7HEADER_CHECK(net/if.h)
8HEADER_CHECK(netinet/in.h)
9HEADER_CHECK(netinet/ssl.h)
10HEADER_CHECK(netinet/tcp.h)
11HEADER_CHECK(netinet/udp.h)
12HEADER_CHECK(sys/socket.h)
13HEADER_CHECK(sys/un.h)
14HEADER_CHECK(ws2tcpip.h)
diff --git a/cmake/config/ecore_x.cmake b/cmake/config/ecore_x.cmake
deleted file mode 100644
index e95e6b2..0000000
--- a/cmake/config/ecore_x.cmake
+++ /dev/null
@@ -1,110 +0,0 @@
1include(FindX11)
2
3EFL_OPTION(XGESTURE "Whenever you want ecore_x to use gesture" OFF)
4EFL_OPTION(XPRESENT "Whenever you want ecore_x to use xpresent" OFF)
5EFL_OPTION(XINPUT2 "Whenever you want ecore_x to use xinput2" ON)
6EFL_OPTION(XINPUT22 "Whenever you want ecore_x to use xinput22" OFF)
7
8#the rest is just statically enabled
9CHECK_APPEND_DEFINE(HAVE_ECORE_X_XLIB ON)
10CHECK_APPEND_DEFINE(ECORE_XKB ON)
11CHECK_APPEND_DEFINE(ECORE_XCOMPOSITE ON)
12CHECK_APPEND_DEFINE(ECORE_XDAMAGE ON)
13CHECK_APPEND_DEFINE(ECORE_XDPMS ON)
14CHECK_APPEND_DEFINE(ECORE_XFIXES ON)
15CHECK_APPEND_DEFINE(ECORE_XINERAMA ON)
16CHECK_APPEND_DEFINE(ECORE_XRANDR ON)
17CHECK_APPEND_DEFINE(ECORE_XSS ON)
18CHECK_APPEND_DEFINE(ECORE_XTEST ON)
19
20#FindX11 does not cover all parts we need so here are the 4 extensions we need to check
21
22#copied from https://github.com/Kitware/CMake/blob/master/Modules/FindX11.cmake#L65
23set(X11_INC_SEARCH_PATH
24 /usr/pkg/xorg/include
25 /usr/X11R6/include
26 /usr/X11R7/include
27 /usr/include/X11
28 /usr/openwin/include
29 /usr/openwin/share/include
30 /opt/graphics/OpenGL/include
31 /opt/X11/include
32)
33
34set(X11_LIB_SEARCH_PATH
35 /usr/pkg/xorg/lib
36 /usr/X11R6/lib
37 /usr/X11R7/lib
38 /usr/openwin/lib
39 /opt/X11/lib
40)
41
42macro(find_lib_and_include name path lib)
43 string(TOUPPER ${name} ecore_name)
44 set(X11_${name}_FOUND OFF)
45 find_library(X11_${name}_LIB ${lib} ${X11_LIB_SEARCH_PATH})
46 find_path(X11_${name}_INCLUDE_PATH X11/extensions/${path} ${X11_INC_SEARCH_PATH})
47 if (X11_${name}_LIB AND X11_${name}_INCLUDE_PATH)
48 set(X11_${name}_FOUND ON)
49 endif()
50
51 CHECK_APPEND_DEFINE(ECORE_${ecore_name} ON)
52endmacro()
53
54if (${XGESTURE})
55 find_lib_and_include(XGesture gesture.h Xgesture)
56endif()
57
58if(${XPRESENT})
59 find_lib_and_include(Xpresent Xpresent.h Xpresent)
60endif()
61
62if(${XINPUT2})
63 find_lib_and_include(Xi2 XInput2.h Xi)
64endif()
65
66if(${XINPUT22})
67 find_lib_and_include(Xi2_2 Xpresent2.h Xi)
68endif()
69
70#build a list of all components we use
71set(_X_EXTENSIONS
72 X11
73 X11_Xkb
74 X11_Xcomposite
75 X11_Xdamage
76 X11_dpms
77 X11_Xfixes
78 X11_Xinerama
79 X11_Xrandr
80 X11_Xrender
81 X11_XTest
82 X11_Xscreensaver
83)
84
85if(${XGESTURE})
86 list(APPEND _X_EXTENSIONS X11_Xgesture)
87endif()
88
89if(${XPRESENT})
90 list(APPEND _X_EXTENSIONS X11_Xpresent)
91endif()
92
93if(${XINPUT2})
94 list(APPEND _X_EXTENSIONS X11_Xi2)
95endif()
96
97if(${XINPUT22})
98 list(APPEND _X_EXTENSIONS X11_Xi2_2)
99endif()
100
101foreach(ext ${_X_EXTENSIONS})
102 if (NOT ${ext}_FOUND)
103 message(FATAL_ERROR "Xserver extension ${ext} not found")
104 endif()
105 list(APPEND X_EXTENSIONS find-${ext})
106endforeach()
107
108configure_file(
109 ${PROJECT_SOURCE_DIR}/src/lib/ecore_x/ecore_x_version.h.cmake
110 ${PROJECT_BINARY_DIR}/src/lib/ecore_x/ecore_x_version.h)
diff --git a/cmake/config/eeze.cmake b/cmake/config/eeze.cmake
deleted file mode 100644
index 2ca6771..0000000
--- a/cmake/config/eeze.cmake
+++ /dev/null
@@ -1,24 +0,0 @@
1
2#check what versions of mount
3pkg_check_modules(MOUNT mount)
4EFL_OPTION(HAVE_EEZE_MOUNT "Whenever to use libmount" ${MOUNT_FOUND} DEPENDS MOUNT_FOUND OFF)
5CHECK_APPEND_DEFINE(HAVE_EEZE_MOUNT ${HAVE_EEZE_MOUNT})
6
7pkg_check_modules(UDEV REQUIRED udev>=148)
8
9if(NOT ${UDEV_FOUND})
10 error("Udev is required")
11endif()
12
13#todo tizen
14if(ENABLED_TIZEN)
15 pkg_check_modules(SENSORS REQUIRED capi-system-sensor>=0.1.17 )
16endif()
17
18set(EEZE_MODULE_TYPE_SENSOR_FAKE ON)
19set(EEZE_MODULE_TYPE_SENSOR_TIZEN OFF)
20set(EEZE_MODULE_TYPE_SENSOR_UDEV ON)
21
22CHECK_APPEND_DEFINE(EEZE_MOUNT_BIN \"bla\")
23CHECK_APPEND_DEFINE(EEZE_UNMOUNT_BIN \"bla\")
24CHECK_APPEND_DEFINE(EEZE_EJECT_BIN \"bla\")
diff --git a/cmake/config/eina.cmake b/cmake/config/eina.cmake
deleted file mode 100644
index 8ba59bb..0000000
--- a/cmake/config/eina.cmake
+++ /dev/null
@@ -1,80 +0,0 @@
1
2# set default option values based on BUILD_PROFILE
3set(EINA_DEBUG_THREADS OFF)
4if("${BUILD_PROFILE}" STREQUAL "dev")
5elseif("${BUILD_PROFILE}" STREQUAL "debug")
6 set(EINA_DEBUG_THREADS ON)
7elseif("${BUILD_PROFILE}" STREQUAL "release")
8endif()
9
10EFL_OPTION(EINA_MAGIC_DEBUG "magic debug of eina structure" ON)
11EFL_OPTION(EINA_DEBUG_THREADS "debugging of eina threads" ${EINA_DEBUG_THREADS})
12
13set(EINA_MODULE_TYPE_MP_CHAINED_POOL_DEFAULT "STATIC")
14set(EINA_MODULE_TYPE_MP_ONE_BIG_DEFAULT "STATIC")
15set(EINA_MODULE_TYPE_MP_PASS_THROUGH_DEFAULT "STATIC")
16
17# no CHECK_INIT() yet, all CHECK_APPEND_DEFINE(), FUNC_CHECK(),
18# HEADER_CHECK() and TYPE_CHECK() goes to src/lib/efl/config_gen.h
19
20if(ENABLE_VALGRIND)
21 CHECK_APPEND_DEFINE(NVALGRIND "")
22else()
23 CHECK_APPEND_DEFINE(NVALGRIND 1)
24endif()
25
26
27# we want the following checks inside src/lib/eina/eina_config.h to be
28# generated from cmake/post/eina.cmake.
29#
30# By default all symbols are prefixed with EINA_
31CHECK_INIT(eina)
32
33if("${BUILD_PROFILE}" STREQUAL "dev")
34elseif("${BUILD_PROFILE}" STREQUAL "debug")
35 set(EINA_STRINGSHARE_USAGE ON)
36 set(EINA_DEBUG_MALLOC ON)
37 set(EINA_COW_MAGIC_ON ON)
38 set(EINA_DEFAULT_MEMPOOL ON)
39 set(EINA_DEBUG_MALLOC ON)
40elseif("${BUILD_PROFILE}" STREQUAL "release")
41 set(EINA_LOG_LEVEL_MAXIMUM 3)
42endif()
43
44CHECK_APPEND_DEFINE(EINA_MAGIC_DEBUG ${EINA_MAGIC_DEBUG})
45CHECK_APPEND_DEFINE(EINA_SAFETY_CHECKS 1)
46CHECK_APPEND_DEFINE(EINA_DEBUG_THREADS "${EINA_DEBUG_THREADS}")
47CHECK_APPEND_DEFINE(EINA_STRINGSHARE_USAGE "${EINA_STRINGSHARE_USAGE}")
48CHECK_APPEND_DEFINE(EINA_DEBUG_MALLOC "${EINA_DEBUG_MALLOC}")
49CHECK_APPEND_DEFINE(EINA_COW_MAGIC_ON "${EINA_COW_MAGIC_ON}")
50CHECK_APPEND_DEFINE(EINA_DEFAULT_MEMPOOL "${EINA_DEFAULT_MEMPOOL}")
51CHECK_APPEND_DEFINE(EINA_DEBUG_MALLOC "${EINA_DEBUG_MALLOC}")
52CHECK_APPEND_DEFINE(EINA_LOG_LEVEL_MAXIMUM "${EINA_LOG_LEVEL_MAXIMUM}")
53CHECK_APPEND_DEFINE(EINA_HAVE_THREADS "${EFL_HAVE_THREADS}")
54
55#check for symbols in pthread
56#TODO Make the definitions depending on the platform
57FUNC_CHECK(pthread_barrier_init NAME EINA_HAVE_PTHREAD_BARRIER INCLUDE_FILES pthread.h FLAGS ${CMAKE_THREAD_LIBS_INIT} DEFINITIONS "-D_GNU_SOURCE=1")
58FUNC_CHECK(pthread_attr_setaffinity_np NAME EINA_HAVE_PTHREAD_AFFINITY INCLUDE_FILES pthread.h FLAGS ${CMAKE_THREAD_LIBS_INIT} DEFINITIONS "-D_GNU_SOURCE=1")
59FUNC_CHECK(pthread_setname_np NAME EINA_HAVE_PTHREAD_SETNAME INCLUDE_FILES pthread.h FLAGS ${CMAKE_THREAD_LIBS_INIT} DEFINITIONS "-D_GNU_SOURCE=1")
60FUNC_CHECK(pthread_spin_init NAME EINA_HAVE_POSIX_SPINLOCK INCLUDE_FILES pthread.h FLAGS ${CMAKE_THREAD_LIBS_INIT} DEFINITIONS "-D_GNU_SOURCE=1")
61
62#check for eina header files that are required
63HEADER_CHECK(alloca.h)
64HEADER_CHECK(byteswap.h)
65HEADER_CHECK(fnmatch.h)
66#only enable log when fnmatch is there
67CHECK_APPEND_DEFINE(EINA_ENABLE_LOG ${EINA_HAVE_FNMATCH_H})
68HEADER_CHECK(dirent.h)
69
70TYPE_CHECK(wchar_t)
71TYPE_CHECK(uintptr_t)
72TYPE_CHECK(wchar_t)
73
74# TODO: fix define name to not need a name!
75#check for swap16/32/64
76FUNC_CHECK(bswap_16 NAME EINA_HAVE_BSWAP16 INCLUDE_FILES byteswap.h)
77FUNC_CHECK(bswap_32 NAME EINA_HAVE_BSWAP32 INCLUDE_FILES byteswap.h)
78FUNC_CHECK(bswap_64 NAME EINA_HAVE_BSWAP64 INCLUDE_FILES byteswap.h)
79
80#Check if there is the alloca header
diff --git a/cmake/config/eldbus.cmake b/cmake/config/eldbus.cmake
deleted file mode 100644
index cb8eeaa..0000000
--- a/cmake/config/eldbus.cmake
+++ /dev/null
@@ -1 +0,0 @@
1pkg_check_modules(DBUS dbus-1 REQUIRED)
diff --git a/cmake/config/emile.cmake b/cmake/config/emile.cmake
deleted file mode 100644
index e8c7359..0000000
--- a/cmake/config/emile.cmake
+++ /dev/null
@@ -1,10 +0,0 @@
1pkg_check_modules(LZ4 liblz4)
2
3set(_choices "internal")
4set(_defval "internal")
5if(LZ4_FOUND)
6 set(_choices system internal)
7 set(_defval system)
8endif()
9
10EFL_OPTION(WITH_LZ4 "Choose if system or internal liblz4 should be used" ${_defval} CHOICE ${_choices})
diff --git a/cmake/config/eo.cmake b/cmake/config/eo.cmake
deleted file mode 100644
index e468b8d..0000000
--- a/cmake/config/eo.cmake
+++ /dev/null
@@ -1,3 +0,0 @@
1EFL_OPTION(HAVE_EO_ID "Have Eo id indirection" ON)
2
3CHECK_APPEND_DEFINE(HAVE_EO_ID ${HAVE_EO_ID})
diff --git a/cmake/config/eolian.cmake b/cmake/config/eolian.cmake
deleted file mode 100644
index ec69256..0000000
--- a/cmake/config/eolian.cmake
+++ /dev/null
@@ -1 +0,0 @@
1EFL_OPTION(EOLIAN_BIN "The eolian_gen binary to use" ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/eolian_gen FILEPATH)
diff --git a/cmake/helpers/EflMacros.cmake b/cmake/helpers/EflMacros.cmake
deleted file mode 100644
index 98ac3f7..0000000
--- a/cmake/helpers/EflMacros.cmake
+++ /dev/null
@@ -1,1790 +0,0 @@
1# NOTE:
2#
3# - Use function() whenever possible, macro() doesn't start a new
4# variable scope and needs careful handling to avoid left overs.
5#
6# - To 'export' values or lists, use the macros SET_GLOBAL() and
7# LIST_APPEND_GLOBAL().
8#
9
10# LIST_APPEND_GLOBAL(Var Element)
11#
12# Append to a list in the global variable scope (cache internal)
13function(LIST_APPEND_GLOBAL _var _element)
14 set(_local ${${_var}})
15 list(APPEND _local ${_element})
16 set(${_var} ${_local} CACHE INTERNAL "")
17endfunction()
18
19# SET_GLOBAL(Var Value [Help])
20#
21# Set a variable in the global variable scope (cache internal)
22function(SET_GLOBAL _var _value)
23 set(${_var} "${_value}" CACHE INTERNAL "${ARGN}")
24endfunction()
25
26unset(EFL_ALL_OPTIONS CACHE)
27unset(EFL_ALL_LIBS CACHE)
28unset(EFL_ALL_TESTS CACHE)
29unset(EFL_PKG_CONFIG_MISSING_OPTIONAL CACHE)
30
31# EFL_OPTION_BACKEND(Name Help Backend1 ... BackendN
32# [DEPENDS "COND1; COND2; NOT COND3" FAILED_VALUE]
33# [REQUIRED])
34#
35# Wrapper around EFL_OPTION() and EFL_BACKEND_CHOICES()
36# that creates an option 'CHOICE' within possible backends
37# when these are found (${Backend}_FOUND).
38#
39# The REQUIRED keyword will force a valid backend, otherwise 'none' is
40# allowed.
41#
42# If a backend was chose, then ${Name}_CFLAGS and ${Name}_LDFLAGS are
43# set to lists based on ${Backend}_CFLAGS or
44# ${Backend}_INCLUDE_DIR/${Backend}_INCLUDE_DIRS and
45# ${Backend}_LDFLAGS or ${Backend}_LIBRARIES
46function(EFL_OPTION_BACKEND _name _help)
47 cmake_parse_arguments(PARAMS "" "" "DEPENDS" ${ARGN})
48
49 EFL_BACKEND_CHOICES(${_name} ${PARAMS_UNPARSED_ARGUMENTS})
50
51 EFL_OPTION(${_name} "${_help}" "${${_name}_DEFAULT}"
52 CHOICE ${${_name}_CHOICES}
53 DEPENDS ${PARAMS_DEPENDS})
54
55 if(NOT ${_name} STREQUAL "none")
56 string(TOUPPER "${${_name}}" _backend)
57 if(DEFINED ${_backend}_CFLAGS)
58 set(_cflags ${${_backend}_CFLAGS})
59 else()
60 set(_cflags "")
61 foreach(_d ${${_backend}_INCLUDE_DIR} ${${_backend}_INCLUDE_DIRS})
62 list(APPEND _cflags "-I${_d}")
63 endforeach()
64 endif()
65 if(DEFINED ${_backend}_LDFLAGS)
66 set(_ldflags ${${_backend}_LDFLAGS})
67 else()
68 set(_ldflags "")
69 foreach(_d ${${_backend}_LIBRARIES})
70 list(APPEND _ldflags "-l${_d}")
71 endforeach()
72 else()
73 endif()
74 SET_GLOBAL(${_name}_CFLAGS "${_cflags}")
75 SET_GLOBAL(${_name}_LDFLAGS "${_ldflags}")
76 SET_GLOBAL(${_name}_ENABLED ON)
77 else()
78 unset(${_name}_CFLAGS CACHE)
79 unset(${_name}_LDFLAGS CACHE)
80 SET_GLOBAL(${_name}_ENABLED OFF)
81 endif()
82endfunction()
83
84# EFL_OPTION(Name Help Default [STRING|BOOL|FILEPATH|PATH]
85# [CHOICE c1;...;cN]
86# [DEPENDS "COND1; COND2; NOT COND3" FAILED_VALUE])
87#
88# Declare an option() that will be automatically printed by
89# EFL_OPTIONS_SUMMARY()
90#
91# To extend the EFL_OPTIONS_SUMMARY() message, use
92# EFL_OPTION_SET_MESSAGE(Name Message)
93function(EFL_OPTION _name _help _defval)
94
95 cmake_parse_arguments(PARAMS "" "" "CHOICE;DEPENDS" ${ARGN})
96
97 set(_type)
98 set(_vartype)
99 set(_choices)
100
101 list(LENGTH PARAMS_UNPARSED_ARGUMENTS _argc)
102 if(_argc LESS 1)
103 set(_type BOOL)
104 set(_vartype BOOL)
105 else()
106 list(GET PARAMS_UNPARSED_ARGUMENTS 0 _type)
107 set(_vartype ${_type})
108 list(REMOVE_AT PARAMS_UNPARSED_ARGUMENTS 0)
109 endif()
110
111 if(PARAMS_CHOICE)
112 set(_type CHOICE)
113 set(_vartype STRING)
114 SET_GLOBAL(EFL_OPTION_CHOICES_${_name} "${PARAMS_CHOICE}" "Possible values for ${_name}")
115 set(_choices " (Choices: ${PARAMS_CHOICE})")
116 endif()
117
118 if(_type STREQUAL "BOOL")
119 # force ON/OFF representation
120 if(_defval)
121 set(_defval ON)
122 else()
123 set(_defval OFF)
124 endif()
125 endif()
126
127 if(EFL_LIB_CURRENT)
128 if(NOT DEFINED EFL_ALL_OPTIONS_${EFL_LIB_CURRENT})
129 LIST_APPEND_GLOBAL(EFL_ALL_OPTIONS EFL_ALL_OPTIONS_${EFL_LIB_CURRENT})
130 endif()
131 LIST_APPEND_GLOBAL(EFL_ALL_OPTIONS_${EFL_LIB_CURRENT} ${_name})
132 else()
133 LIST_APPEND_GLOBAL(EFL_ALL_OPTIONS ${_name})
134 endif()
135
136 SET_GLOBAL(EFL_OPTION_DEFAULT_${_name} "${_defval}" "Default value for ${_name}")
137 SET_GLOBAL(EFL_OPTION_TYPE_${_name} "${_vartype}" "Type of ${_name}")
138
139 set(_available ON)
140 if(PARAMS_DEPENDS)
141 list(LENGTH PARAMS_DEPENDS _count)
142 list(GET PARAMS_DEPENDS 0 _deps)
143 list(GET PARAMS_DEPENDS 1 _deps_failure_value)
144 if(_deps_failure_value STREQUAL "NOTFOUND")
145 message(FATAL_ERROR "EFL_OPTION(${_name}) has DEPENDS but no value when dependencies fail")
146 endif()
147
148 set(_missing_deps "")
149 foreach(_d ${_deps})
150 if(${_d})
151 else()
152 set(_available OFF)
153 list(APPEND _missing_deps "${_d}")
154 endif()
155 endforeach()
156 endif()
157
158 if(_available)
159 if(DEFINED EFL_OPTION_ORIGINAL_VALUE_${_name})
160 set(${_name} ${EFL_OPTION_ORIGINAL_VALUE_${_name}} CACHE ${_type} "${_help}${_choices}" FORCE)
161 unset(EFL_OPTION_ORIGINAL_VALUE_${_name} CACHE)
162 else()
163 set(${_name} ${_defval} CACHE ${_type} "${_help}${_choices}")
164 endif()
165 unset(EFL_OPTION_DEPENDS_MISSING_${_name} CACHE)
166 option(${_name} "${_help}${_choices}" "${${_name}}")
167 else()
168 if(NOT DEFINED EFL_OPTION_ORIGINAL_VALUE_${_name})
169 if(DEFINED ${_name})
170 SET_GLOBAL(EFL_OPTION_ORIGINAL_VALUE_${_name} "${${_name}}")
171 endif()
172 endif()
173 SET_GLOBAL(EFL_OPTION_DEPENDS_MISSING_${_name} "${_missing_deps}")
174 set(${_name} "${_deps_failure_value}" CACHE "${_type}" "Missing dependencies (${_help}${_choices})" FORCE)
175 endif()
176
177 if(_choices)
178 list(FIND PARAMS_CHOICE "${${_name}}" _ret)
179 if(${_ret} EQUAL -1)
180 message(FATAL_ERROR "Invalid choice ${_name}=${${_name}}${_choices}")
181 endif()
182 endif()
183endfunction()
184
185# EFL_OPTION_SET_MESSAGE(Name Message)
186#
187# Extends the summary line output by EFL_OPTIONS_SUMMARY()
188# with more details.
189function(EFL_OPTION_SET_MESSAGE _name _message)
190 SET_GLOBAL(EFL_OPTION_MESSAGE_${_name} "${_message}")
191endfunction()
192
193
194# _EFL_OPTIONS_SUMMARY_INTERNAL(Prefix Option)
195#
196# Internal function for EFL_OPTIONS_SUMMARY().
197function(_EFL_OPTIONS_SUMMARY_INTERNAL _prefix _o)
198 set(_v ${${_o}})
199 set(_d ${EFL_OPTION_DEFAULT_${_o}})
200 if(EFL_OPTION_DEPENDS_MISSING_${_o})
201 set(_i "requires: ${EFL_OPTION_DEPENDS_MISSING_${_o}}, was: ${EFL_OPTION_ORIGINAL_VALUE_${_o}}")
202 elseif("${_v}" STREQUAL "${_d}")
203 set(_i "default")
204 else()
205 set(_i "default: ${_d}")
206 endif()
207 if(EFL_OPTION_MESSAGE_${_o})
208 set(_m " [${EFL_OPTION_MESSAGE_${_o}}]")
209 else()
210 set(_m)
211 endif()
212 message(STATUS "${_prefix}${_o}=${_v} (${_i})${_m}")
213endfunction()
214
215# EFL_OPTIONS_SUMMARY()
216# Shows the summary of options, their values and related messages.
217function(EFL_OPTIONS_SUMMARY)
218 message(STATUS "EFL ${PROJECT_VERSION} Options Summary:")
219 message(STATUS " CMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}")
220 message(STATUS " CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}")
221 foreach(_o ${EFL_ALL_OPTIONS})
222 if(_o MATCHES "^EFL_ALL_OPTIONS_")
223 string(REGEX REPLACE "^EFL_ALL_OPTIONS_" "" _name "${_o}")
224 message(STATUS "")
225 message(STATUS " ${_name} options:")
226 foreach(_so ${${_o}})
227 _EFL_OPTIONS_SUMMARY_INTERNAL(" " ${_so})
228 endforeach()
229 else()
230 _EFL_OPTIONS_SUMMARY_INTERNAL(" " ${_o})
231 endif()
232 endforeach()
233 message(STATUS "")
234 message(STATUS "EFL Libraries:")
235 foreach(_o ${EFL_ALL_LIBS})
236 message(STATUS " ${_o}${_mods}")
237 foreach(_m ${${_o}_MODULES})
238 string(REGEX REPLACE "^${_o}-module-" "" _m ${_m})
239 message(STATUS " dynamic: ${_m}")
240 endforeach()
241 foreach(_m ${${_o}_STATIC_MODULES})
242 string(REGEX REPLACE "^${_o}-module-" "" _m ${_m})
243 message(STATUS " static.: ${_m}")
244 endforeach()
245 unset(_m)
246 endforeach()
247
248 if(EFL_PKG_CONFIG_MISSING_OPTIONAL)
249 message(STATUS "")
250 message(STATUS "The following pkg-config optional modules are missing:")
251 foreach(_m ${EFL_PKG_CONFIG_MISSING_OPTIONAL})
252 message(STATUS " ${_m}")
253 endforeach()
254 unset(_m)
255 endif()
256endfunction()
257
258set(EFL_ALL_LIBS)
259set(EFL_ALL_TESTS)
260
261# EFL_FINALIZE()
262#
263# Finalize EFL processing, adding extra targets.
264function(EFL_FINALIZE)
265 add_custom_target(all-libs DEPENDS ${EFL_ALL_LIBS})
266 add_custom_target(all-tests DEPENDS ${EFL_ALL_TESTS})
267endfunction()
268
269set(VAR_HEADER_FILE_CONTENT HEADER_FILE_CONTENT CACHE INTERNAL "")
270unset(${VAR_HEADER_FILE_CONTENT} CACHE)
271unset(CHECK_SCOPE CACHE)
272unset(CHECK_SCOPE_UPPERCASE CACHE)
273
274# CHECK_INIT(scope)
275#
276# Initialize the scope for the following FUNC_CHECK, TYPE_CHECK,
277# HEADER_CHECK... calls.
278function(CHECK_INIT scope)
279 set(CHECK_SCOPE scope CACHE INTERNAL "Scope of current *_CHECK functions")
280 if(scope)
281 string(TOUPPER ${scope} scope_uc)
282 SET_GLOBAL(CHECK_SCOPE_UPPERCASE ${scope_uc})
283 set(_suffix "_${scope_uc}")
284 else()
285 set(_suffix "")
286 endif()
287 SET_GLOBAL(VAR_HEADER_FILE_CONTENT HEADER_FILE_CONTENT${_suffix})
288 SET_GLOBAL(${VAR_HEADER_FILE_CONTENT} "")
289endfunction()
290
291# CHECK_APPEND_DEFINE(name value)
292#
293# If value evaluates to true:
294# #define ${name} ${value}
295# otherwise:
296# /* #undef ${name} */
297#
298# NOTE: ${name} is not modified at all, if it must include
299# CHECK_SCOPE_UPPERCASE or CHECK_SCOPE, do it yourself.
300function(CHECK_APPEND_DEFINE name value)
301 SET_GLOBAL(${VAR_HEADER_FILE_CONTENT} "${${VAR_HEADER_FILE_CONTENT}}#ifdef ${name}\n#undef ${name}\n#endif\n")
302 if(value)
303 if(value STREQUAL ON OR value STREQUAL TRUE)
304 set(value 1)
305 endif()
306 SET_GLOBAL(${VAR_HEADER_FILE_CONTENT} "${${VAR_HEADER_FILE_CONTENT}}#define ${name} ${value}\n\n")
307 else()
308 SET_GLOBAL(${VAR_HEADER_FILE_CONTENT} "${${VAR_HEADER_FILE_CONTENT}}/* #undef ${name} */\n\n")
309 endif()
310endfunction()
311
312# CHECK_NAME_DEFAULT(name variable)
313#
314# Create the default name based on ${name}
315# and stores in ${variable}.
316#
317# This will automatically prepend ${CHECK_SCOPE_UPPERCASE} if it's
318# defined, will translate everything to uppercase and fix it to be a
319# valid C-symbol.
320function(CHECK_NAME_DEFAULT name var)
321 string(TOUPPER ${name} v)
322 string(REGEX REPLACE "[^a-zA-Z0-9]" "_" v "${v}")
323 string(REGEX REPLACE "_{2,}" "_" v "${v}")
324 if(CHECK_SCOPE_UPPERCASE)
325 set(v "${CHECK_SCOPE_UPPERCASE}_${v}")
326 endif()
327 set(${var} ${v} PARENT_SCOPE)
328endfunction()
329
330# HEADER_CHECK(header [NAME variable] [INCLUDE_FILES extra1.h .. extraN.h])
331#
332# Check if the header file exists, in such case define variable
333# in configuration file.
334#
335# Variable defaults to HAVE_${HEADER}, where HEADER is the uppercase
336# representation of the first parameter. It can be overridden using
337# NAME keyword.
338#
339# To include extra files, then use INCLUDE_FILES keyword.
340function(HEADER_CHECK header)
341 CHECK_NAME_DEFAULT(HAVE_${header} var)
342
343 cmake_parse_arguments(PARAMS "" "NAME" "INCLUDE_FILES" ${ARGN})
344
345 if(PARAMS_NAME)
346 set(var ${PARAMS_NAME})
347 endif()
348
349 set(CMAKE_EXTRA_INCLUDE_FILES "${PARAMS_INCLUDE_FILES}")
350
351 CHECK_INCLUDE_FILE(${header} ${var})
352 CHECK_APPEND_DEFINE(${var} "${${var}}")
353endfunction()
354
355# FUNC_CHECK(func [NAME variable]
356# [INCLUDE_FILES header1.h .. headerN.h]
357# [LIBRARIES lib1 ... libN]
358# [DEFINITIONS -DA=1 .. -DN=123]
359# [FLAGS -cmdlineparam1 .. -cmdlineparamN]
360# [CXX])
361#
362# Check if the function exists, in such case define variable in
363# configuration file.
364#
365# Variable defaults to HAVE_${FUNC}, where FUNC is the uppercase
366# representation of the first parameter. It can be overridden using
367# NAME keyword.
368#
369# To define include files use INCLUDE_FILES keyword.
370#
371# To use C++ compiler, use CXX keyword
372function(FUNC_CHECK func)
373 CHECK_NAME_DEFAULT(HAVE_${func} var)
374
375 cmake_parse_arguments(PARAMS "CXX" "NAME" "INCLUDE_FILES;LIBRARIES;DEFINITIONS;FLAGS" ${ARGN})
376
377 set(CMAKE_REQUIRED_LIBRARIES "${PARAMS_LIBRARIES}")
378 set(CMAKE_REQUIRED_DEFINITIONS "${PARAMS_DEFINITIONS}")
379 set(CMAKE_REQUIRED_FLAGS "${PARAMS_FLAGS}")
380
381 if(PARAMS_NAME)
382 set(var ${PARAMS_NAME})
383 endif()
384
385 if(PARAMS_CXX)
386 check_cxx_symbol_exists(${func} "${PARAMS_INCLUDE_FILES}" ${var})
387 else()
388 check_symbol_exists(${func} "${PARAMS_INCLUDE_FILES}" ${var})
389 endif()
390
391 CHECK_APPEND_DEFINE(${var} "${${var}}")
392endfunction()
393
394# TYPE_CHECK(type [NAME variable] [SIZEOF variable]
395# [INCLUDE_FILES file1.h ... fileN.h]
396# [LIBRARIES lib1 ... libN]
397# [DEFINITIONS -DA=1 .. -DN=123]
398# [FLAGS -cmdlineparam1 .. -cmdlineparamN]
399# [CXX])
400#
401# Check if the type exists and its size, in such case define variable
402# in configuration file.
403#
404# Variable defaults to HAVE_${TYPE}, where TYPE is the uppercase
405# representation of the first parameter. It can be overridden using
406# NAME keyword.
407#
408# To define include files use INCLUDE_FILES keyword.
409#
410# To use C++ compiler, use CXX keyword
411function(TYPE_CHECK type)
412 CHECK_NAME_DEFAULT(HAVE_${type} var)
413 CHECK_NAME_DEFAULT(SIZEOF_${type} sizeof)
414
415 cmake_parse_arguments(PARAMS "CXX" "NAME;SIZEOF" "INCLUDE_FILES;LIBRARIES;DEFINITIONS;FLAGS" ${ARGN})
416
417 set(CMAKE_REQUIRED_LIBRARIES "${PARAMS_LIBRARIES}")
418 set(CMAKE_REQUIRED_DEFINITIONS "${PARAMS_DEFINITIONS}")
419 set(CMAKE_REQUIRED_FLAGS "${PARAMS_FLAGS}")
420 set(CMAKE_EXTRA_INCLUDE_FILES "${PARAMS_INCLUDE_FILES}")
421
422 if(PARAMS_NAME)
423 set(var ${PARAMS_NAME})
424 endif()
425
426 if(PARAMS_SIZEOF)
427 set(sizeof ${PARAMS_SIZEOF})
428 endif()
429
430 if(PARAMS_CXX)
431 set(lang CXX)
432 else()
433 set(lang C)
434 endif()
435
436 CHECK_TYPE_SIZE(${type} ${var} LANGUAGE ${lang})
437 CHECK_APPEND_DEFINE(${var} "${HAVE_${var}}")
438 CHECK_APPEND_DEFINE(${sizeof} "${${var}}")
439endfunction()
440
441# EFL_HEADER_CHECKS_FINALIZE(file)
442#
443# Write the configuration gathered with HEADER_CHECK(), TYPE_CHECK()
444# and FUNC_CHECK() to the given file.
445function(EFL_HEADER_CHECKS_FINALIZE file)
446 get_filename_component(filename ${file} NAME)
447 string(TOUPPER _${filename}_ file_sym)
448 string(REGEX REPLACE "[^a-zA-Z0-9]" "_" file_sym "${file_sym}")
449
450 file(WRITE ${file}.new "#ifndef ${file_sym}\n#define ${file_sym} 1\n\n${${VAR_HEADER_FILE_CONTENT}}\n#endif /* ${file_sym} */\n")
451 if (NOT EXISTS ${file})
452 file(RENAME ${file}.new ${file})
453 message(STATUS "${file} was generated.")
454 else()
455 file(MD5 ${file}.new _new_md5)
456 file(MD5 ${file} _old_md5)
457 if(_new_md5 STREQUAL _old_md5)
458 message(STATUS "${file} is unchanged.")
459 else()
460 file(REMOVE ${file})
461 file(RENAME ${file}.new ${file})
462 message(STATUS "${file} was updated.")
463 endif()
464 endif()
465 unset(${VAR_HEADER_FILE_CONTENT} CACHE) # allow to reuse with an empty contents
466 unset(CHECK_SCOPE CACHE)
467 unset(CHECK_SCOPE_UPPERCASE CACHE)
468 set(VAR_HEADER_FILE_CONTENT HEADER_FILE_CONTENT CACHE INTERNAL "")
469endfunction()
470
471# EFL_FILES_TO_ABSOLUTE(Var Source_Dir Binary_Dir [file1 ... fileN])
472#
473# Convert list of files to absolute path. If not absolute, then
474# check inside Source_Dir and if it fails assumes it's inside Binary_Dir
475function(EFL_FILES_TO_ABSOLUTE _var _srcdir _bindir)
476 set(_lst "")
477 foreach(f ${ARGN})
478 if(EXISTS "${f}" OR IS_ABSOLUTE "${f}")
479 list(APPEND _lst "${f}")
480 elseif(EXISTS "${_srcdir}/${f}")
481 list(APPEND _lst "${_srcdir}/${f}")
482 else()
483 list(APPEND _lst "${_bindir}/${f}")
484 endif()
485 endforeach()
486 set(${_var} "${_lst}" PARENT_SCOPE)
487endfunction()
488
489# EFL_PKG_CONFIG_EVAL_TO(Var Name [module1 ... moduleN])
490#
491# Evaluate the list of of pkg-config modules and assign to variable
492# Var. If it's missing, abort with a message saying ${Name} is missing
493# the list of modules.
494#
495# OPTIONAL keyword may be used to convert the remaining elements in optional
496# packages.
497function(EFL_PKG_CONFIG_EVAL_TO _var _name)
498 set(_found "")
499 set(_missing "")
500 set(_missing_optional "")
501 set(_optional OFF)
502 set(_have_definitions "")
503 foreach(f ${ARGN})
504 if(${f} STREQUAL "OPTIONAL")
505 set(_optional ON)
506 else()
507 string(REGEX REPLACE "[><=].*\$" "" v "${f}")
508 string(REGEX REPLACE "[^A-Za-z0-9]" "_" v "${v}")
509 string(TOUPPER "${v}" v)
510 pkg_check_modules(PKG_CONFIG_DEP_${v} ${f})
511 if(PKG_CONFIG_DEP_${v}_FOUND)
512 list(APPEND _found ${f})
513 list(APPEND _have_definitions "-DHAVE_${v}=1" "-DENABLE_${v}=1")
514 elseif(_optional)
515 list(APPEND _missing_optional ${f})
516 LIST_APPEND_GLOBAL(EFL_PKG_CONFIG_MISSING_OPTIONAL ${f})
517 else()
518 list(APPEND _missing ${f})
519 else()
520 endif()
521 endif()
522 endforeach()
523
524 unset(${_var}_CFLAGS CACHE)
525 unset(${_var}_LDFLAGS CACHE)
526 unset(PKG_CONFIG_${_var} CACHE)
527 unset(PKG_CONFIG_${_var}_CFLAGS CACHE)
528 unset(PKG_CONFIG_${_var}_FOUND CACHE)
529 unset(PKG_CONFIG_${_var}_INCLUDE_DIRS CACHE)
530 unset(PKG_CONFIG_${_var}_INCLUDEDIR CACHE)
531 unset(PKG_CONFIG_${_var}_LDFLAGS CACHE)
532 unset(PKG_CONFIG_${_var}_LIBDIR CACHE)
533 unset(PKG_CONFIG_${_var}_LIBRARIES CACHE)
534 unset(PKG_CONFIG_${_var}_LIBRARIES CACHE)
535 unset(PKG_CONFIG_${_var}_LIBRARIES_DIR CACHE)
536 unset(PKG_CONFIG_${_var}_LIBS CACHE)
537 unset(PKG_CONFIG_${_var}_VERSION CACHE)
538 if(NOT _missing)
539 SET_GLOBAL(${_var} "${_found}")
540 SET_GLOBAL(${_var}_MISSING "${_missing_optional}")
541
542 if(_found)
543 pkg_check_modules(PKG_CONFIG_${_var} ${_found})
544 SET_GLOBAL(${_var}_CFLAGS "${_have_definitions};${PKG_CONFIG_${_var}_CFLAGS}")
545 SET_GLOBAL(${_var}_LDFLAGS "${PKG_CONFIG_${_var}_LDFLAGS}")
546 endif()
547 else()
548 message(FATAL_ERROR "${_name} missing required pkg-config modules: ${_missing}")
549 endif()
550endfunction()
551
552# EFL_PKG_CONFIG_EVAL(Name Private_List Public_List)
553#
554# Evaluates both lists and creates ${Name}_PKG_CONFIG_REQUIRES as well as
555# ${Name}_PKG_CONFIG_REQUIRES_PRIVATE with found elements.
556#
557# OPTIONAL keyword may be used to convert the remaining elements in optional
558# packages.
559function(EFL_PKG_CONFIG_EVAL _target _private _public)
560 EFL_PKG_CONFIG_EVAL_TO(${_target}_PKG_CONFIG_REQUIRES ${_target} ${_public})
561 EFL_PKG_CONFIG_EVAL_TO(${_target}_PKG_CONFIG_REQUIRES_PRIVATE ${_target} ${_private})
562
563 set(_lst ${${_target}_PKG_CONFIG_REQUIRES_MISSING})
564 foreach(_e ${${_target}_PKG_CONFIG_REQUIRES_PRIVATE_MISSING})
565 list(APPEND _lst ${_e})
566 endforeach()
567 if(_lst)
568 message(STATUS "${_target} missing optional pkg-config: ${_lst}")
569 endif()
570endfunction()
571
572function(EFL_PKG_CONFIG_LIB_WRITE)
573 set(_pkg_config_requires)
574 set(_pkg_config_requires_private)
575 set(_libraries)
576 set(_public_libraries)
577
578 get_target_property(_pkg_config_name ${EFL_LIB_CURRENT} PKG_CONFIG_NAME)
579 get_target_property(_version ${EFL_LIB_CURRENT} VERSION)
580
581 get_target_property(eo_files_public ${EFL_LIB_CURRENT} EFL_EO_PUBLIC)
582 if(eo_files_public)
583 set(_eoinfo "eoincludedir=\${datarootdir}/eolian/include
584eolian_flags=-I\${pc_sysrootdir}\${eoincludedir}/${EFL_LIB_CURRENT}-${PROJECT_VERSION_MAJOR}")
585 else()
586 set(_eoinfo "")
587 endif()
588
589 foreach(_e ${${EFL_LIB_CURRENT}_PKG_CONFIG_REQUIRES})
590 set(_pkg_config_requires "${_pkg_config_requires} ${_e}")
591 endforeach()
592
593 foreach(_e ${${EFL_LIB_CURRENT}_PKG_CONFIG_REQUIRES_PRIVATE})
594 set(_pkg_config_requires_private "${_pkg_config_requires_private} ${_e}")
595 endforeach()
596
597 foreach(_e ${LIBRARIES})
598 if(TARGET ${_e})
599 if(NOT _e MATCHES "^support-")
600 get_target_property(_sub_pc_name ${_e} PKG_CONFIG_NAME)
601 get_target_property(_sub_version ${_e} VERSION)
602 set(_pkg_config_requires_private "${_pkg_config_requires_private} ${_sub_pc_name}>=${_sub_version}")
603 else()
604 get_target_property(_type ${_e} TYPE)
605 if(_type STREQUAL SHARED_LIBRARY)
606 get_target_property(_oname ${_e} OUTPUT_NAME)
607 set(_libraries "${_libraries} -l${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/efl/support/v-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}/${CMAKE_SHARED_LIBRARY_PREFIX}${_oname}${CMAKE_SHARED_LIBRARY_SUFFIX}")
608 endif()
609 endif()
610 else()
611 set(_libraries "${_libraries} -l${_e}")
612 endif()
613 endforeach()
614
615 foreach(_e ${PUBLIC_LIBRARIES})
616 if(TARGET ${_e})
617 get_target_property(_sub_pc_name ${_e} PKG_CONFIG_NAME)
618 get_target_property(_sub_version ${_e} VERSION)
619 set(_pkg_config_requires "${_pkg_config_requires} ${_sub_pc_name}>=${_sub_version}")
620 else()
621 set(_public_libraries "${_public_libraries} -l${_e}")
622 endif()
623 endforeach()
624
625 if(NOT ${EFL_LIB_CURRENT} STREQUAL "efl")
626 set(_cflags " -I\${includedir}/${EFL_LIB_CURRENT}-${PROJECT_VERSION_MAJOR}")
627 endif()
628
629 # TODO: handle eolian needs
630
631 set(_contents
632"prefix=${CMAKE_INSTALL_PREFIX}
633exec_prefix=\${prefix}
634libdir=\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}
635includedir=\${prefix}/include
636datarootdir=\${prefix}/share
637datadir=\${datarootdir}
638pkgdatadir=\${datadir}/${EFL_LIB_CURRENT}
639modules=\${libdir}/${EFL_LIB_CURRENT}/modules
640${_eoinfo}
641
642Name: ${_pkg_config_name}
643Description: ${DESCRIPTION}
644Version: ${_version}
645Requires:${_pkg_config_requires}
646Requires.private:${_pkg_config_requires_private}
647Libs: -L\${libdir} -l${EFL_LIB_CURRENT}${_public_libraries}
648Libs.private:${_libraries}
649Cflags: -I\${includedir}/efl-${PROJECT_VERSION_MAJOR}${_cflags}
650")
651 file(WRITE "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/pkgconfig/${_pkg_config_name}.pc" "${_contents}")
652 install(FILES "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/pkgconfig/${_pkg_config_name}.pc"
653 DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
654endfunction()
655
656# _EFL_INCLUDE_OR_DETECT(Name Source_Dir)
657#
658# Internal macro that will include(${Source_Dir}/CMakeLists.txt) if
659# that exists, otherwise will check if there is a single source file,
660# in that case it will automatically define SOURCES to that (including
661# extras such as headers and .eo)
662#
663# Name is only used to print out messages when it's auto-detected.
664macro(_EFL_INCLUDE_OR_DETECT _name _srcdir)
665 if(EXISTS ${_srcdir}/CMakeLists.txt)
666 include(${_srcdir}/CMakeLists.txt)
667 else()
668 # doc says it's not recommended because it can't know if more files
669 # were added, but we're doing this explicitly to handle one file.
670 file(GLOB _autodetect_files RELATIVE ${_srcdir}
671 ${_srcdir}/*.c
672 ${_srcdir}/*.h
673 ${_srcdir}/*.hh
674 ${_srcdir}/*.cxx
675 ${_srcdir}/*.cpp
676 )
677 list(LENGTH _autodetect_files _autodetect_files_count)
678 if(_autodetect_files_count GREATER 1)
679 message(WARNING "${_name}: ${_srcdir} contains no CMakeLists.txt and contains more than one source file. Don't know what to do, then ignored.")
680 elseif(_autodetect_files_count EQUAL 1)
681 file(GLOB SOURCES RELATIVE ${_srcdir}
682 ${_srcdir}/*.c
683 ${_srcdir}/*.h
684 ${_srcdir}/*.hh
685 ${_srcdir}/*.cxx
686 ${_srcdir}/*.cpp
687 )
688 file(GLOB EO_FILES RELATIVE ${_srcdir}
689 ${_srcdir}/*.eo
690 ${_srcdir}/*.eot
691 )
692 message(STATUS "${_name} auto-detected as: ${SOURCES}")
693 if(EO_FILES)
694 message(STATUS "${_name} EO auto-detected as: ${EO_FILES}")
695 endif()
696 else()
697 message(STATUS "${_name} contains no auto-detectable sources.")
698 endif()
699 unset(_autodetect_files_count)
700 unset(_autodetect_files)
701 endif()
702endmacro()
703
704# _EFL_LIB_PROCESS_MODULES_INTERNAL()
705#
706# Internal function to process modules of current EFL_LIB()
707function(_EFL_LIB_PROCESS_MODULES_INTERNAL)
708 unset(${EFL_LIB_CURRENT}_MODULES CACHE)
709 unset(${EFL_LIB_CURRENT}_STATIC_MODULES CACHE)
710
711 if(EXISTS ${EFL_MODULES_SOURCE_DIR}/CMakeLists.txt)
712 message(FATAL_ERROR "${EFL_MODULES_SOURCE_DIR}/CMakeLists.txt shouldn't exist. Modules are expected to be defined in their own directory.")
713 else()
714 file(GLOB modules RELATIVE ${EFL_MODULES_SOURCE_DIR} ${EFL_MODULES_SOURCE_DIR}/*)
715 foreach(module ${modules})
716 if(IS_DIRECTORY ${EFL_MODULES_SOURCE_DIR}/${module})
717 set(EFL_MODULE_SCOPE ${module})
718
719 file(GLOB submodules RELATIVE ${EFL_MODULES_SOURCE_DIR}/${EFL_MODULE_SCOPE} ${EFL_MODULES_SOURCE_DIR}/${EFL_MODULE_SCOPE}/*)
720 foreach(submodule ${submodules})
721 if(IS_DIRECTORY ${EFL_MODULES_SOURCE_DIR}/${EFL_MODULE_SCOPE}/${submodule})
722 EFL_MODULE(${submodule})
723 endif()
724 unset(submodule)
725 unset(submodules)
726 endforeach()
727 else()
728 set(EFL_MODULE_SCOPE)
729 EFL_MODULE(${module})
730 endif()
731 unset(EFL_MODULE_SCOPE)
732 endforeach()
733 endif()
734
735 if(${EFL_LIB_CURRENT}_MODULES)
736 add_custom_target(${EFL_LIB_CURRENT}-modules DEPENDS ${${EFL_LIB_CURRENT}_MODULES})
737 endif()
738endfunction()
739
740# _EFL_LIB_PROCESS_BINS_INTERNAL()
741#
742# Internal function to process bins of current EFL_LIB()
743function(_EFL_LIB_PROCESS_BINS_INTERNAL)
744 unset(${EFL_LIB_CURRENT}_BINS CACHE)
745
746 if(EXISTS ${EFL_BIN_SOURCE_DIR}/CMakeLists.txt)
747 EFL_BIN(${EFL_LIB_CURRENT})
748 else()
749 file(GLOB bins RELATIVE ${EFL_BIN_SOURCE_DIR} ${EFL_BIN_SOURCE_DIR}/*)
750 foreach(bin ${bins})
751 if(IS_DIRECTORY ${EFL_BIN_SOURCE_DIR}/${bin})
752 EFL_BIN(${bin})
753 endif()
754 endforeach()
755 endif()
756
757 if(NOT ${EFL_LIB_CURRENT}_BINS AND EXISTS ${EFL_BIN_SOURCE_DIR} AND NOT EXISTS ${EFL_BIN_SOURCE_DIR}/CMakeLists.txt)
758 EFL_BIN(${EFL_LIB_CURRENT})
759 endif()
760
761 if(${EFL_LIB_CURRENT}_BINS)
762 add_custom_target(${EFL_LIB_CURRENT}-bins DEPENDS ${${EFL_LIB_CURRENT}_BINS})
763 endif()
764endfunction()
765
766# _EFL_LIB_PROCESS_TESTS_INTERNAL()
767#
768# Internal function to process tests of current EFL_LIB()
769function(_EFL_LIB_PROCESS_TESTS_INTERNAL)
770 unset(${EFL_LIB_CURRENT}_TESTS CACHE)
771
772 if(EXISTS ${EFL_TESTS_SOURCE_DIR}/CMakeLists.txt)
773 EFL_TEST(${EFL_LIB_CURRENT})
774 else()
775 file(GLOB tests RELATIVE ${EFL_TESTS_SOURCE_DIR} ${EFL_TESTS_SOURCE_DIR}/*)
776 foreach(test ${tests})
777 if(IS_DIRECTORY ${EFL_TESTS_SOURCE_DIR}/${test})
778 EFL_TEST(${test})
779 endif()
780 endforeach()
781 endif()
782
783 if(NOT ${EFL_LIB_CURRENT}_TESTS AND EXISTS ${EFL_TESTS_SOURCE_DIR} AND NOT EXISTS ${EFL_TESTS_SOURCE_DIR}/CMakeLists.txt)
784 EFL_TEST(${EFL_LIB_CURRENT})
785 endif()
786
787 if(${EFL_LIB_CURRENT}_TESTS)
788 add_custom_target(${EFL_LIB_CURRENT}-tests DEPENDS ${${EFL_LIB_CURRENT}_TESTS})
789 LIST_APPEND_GLOBAL(EFL_ALL_TESTS ${EFL_LIB_CURRENT}-tests)
790 endif()
791endfunction()
792
793define_property(TARGET PROPERTY EFL_EO_PRIVATE
794 BRIEF_DOCS "EFL's .eo/.eot files associated with this target and not installed"
795 FULL_DOCS "The list of all .eo or .eot files this target uses but doesn't install")
796
797define_property(TARGET PROPERTY EFL_EO_PUBLIC
798 BRIEF_DOCS "EFL's .eo/.eot files associated with this target and installed"
799 FULL_DOCS "The list of all .eo or .eot files this target uses and installs")
800
801define_property(TARGET PROPERTY PKG_CONFIG_NAME
802 BRIEF_DOCS "The name to use with pkg-config (.pc) files"
803 FULL_DOCS "This is usually the target name unless some backward compatibility or translations are needed")
804
805# EFL_SUPPORT_LIB(Name)
806#
807# adds a support library as src/static_libs/${Name}, this will
808# generate a static library that can be later referred by other
809# targets using support-${Name}
810#
811# This is simiar to EFL_LIB(), however defaults to STATIC libraries
812# and if set to SHARED will install to
813# ${CMAKE_INSTALL_LIBDIR}/efl/support/v-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
814# and it shouldn't set any PUBLIC_HEADERS or PKG_CONFIG_REQUIRES.
815function(EFL_SUPPORT_LIB _target)
816 set(EFL_LIB_CURRENT ${_target})
817 set(EFL_LIB_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/static_libs/${_target})
818 set(EFL_LIB_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/src/static_libs/${_target})
819
820 set(DESCRIPTION)
821 set(PKG_CONFIG_REQUIRES)
822 set(PKG_CONFIG_REQUIRES_PRIVATE)
823 set(INCLUDE_DIRECTORIES)
824 set(SYSTEM_INCLUDE_DIRECTORIES)
825 set(OUTPUT_NAME)
826 set(SOURCES)
827 set(PUBLIC_HEADERS)
828 set(VERSION)
829 set(SOVERSION)
830 set(LIBRARY_TYPE STATIC)
831 set(OBJECT_DEPENDS)
832 set(DEPENDENCIES)
833 set(LIBRARIES)
834 set(PUBLIC_LIBRARIES)
835 set(DEFINITIONS)
836 set(COMPILE_FLAGS)
837 set(LINK_FLAGS)
838
839 include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/config/${_target}.cmake OPTIONAL)
840 include(${EFL_LIB_SOURCE_DIR}/CMakeLists.txt)
841
842 if(NOT SOURCES)
843 message(WARNING "${EFL_LIB_SOURCE_DIR}/CMakeLists.txt defines no SOURCES")
844 return()
845 endif()
846 if(PUBLIC_HEADERS)
847 message(WARNING "${EFL_LIB_SOURCE_DIR}/CMakeLists.txt should not define PUBLIC_HEADERS, it's not to be installed.")
848 endif()
849 if(PKG_CONFIG_REQUIRES)
850 message(WARNING "${EFL_LIB_SOURCE_DIR}/CMakeLists.txt should not define PKG_CONFIG_REQUIRES. Use PKG_CONFIG_REQUIRES_PRIVATE instead")
851 endif()
852
853 EFL_FILES_TO_ABSOLUTE(_sources ${EFL_LIB_SOURCE_DIR} ${EFL_LIB_BINARY_DIR}
854 ${SOURCES})
855 EFL_FILES_TO_ABSOLUTE(_obj_deps ${EFL_LIB_SOURCE_DIR} ${EFL_LIB_BINARY_DIR}
856 ${OBJECT_DEPENDS})
857
858 EFL_PKG_CONFIG_EVAL(${_target} "${PKG_CONFIG_REQUIRES_PRIVATE}" "${PKG_CONFIG_REQUIRES}")
859
860 set(__link_flags ${${_target}_PKG_CONFIG_REQUIRES_PRIVATE_LDFLAGS} ${${_target}_PKG_CONFIG_REQUIRES_LDFLAGS} ${LINK_FLAGS})
861 set(__compile_flags ${${_target}_PKG_CONFIG_REQUIRES_PRIVATE_CFLAGS} ${${_target}_PKG_CONFIG_REQUIRES_CFLAGS} ${COMPILE_FLAGS})
862
863 set(_link_flags)
864 foreach(_l ${__link_flags})
865 set(_link_flags "${_link_flags} ${_l}")
866 endforeach()
867
868 set(_compile_flags)
869 foreach(_c ${__compile_flags})
870 set(_compile_flags "${_compile_flags} ${_c}")
871 endforeach()
872
873 set(_libraries)
874 foreach(_l ${LIBRARIES})
875 if(${_l} MATCHES "^find-")
876 string(REGEX REPLACE "^find-" "" _v "${_l}")
877 list(APPEND _libraries ${${_v}_LIBRARIES})
878 list(APPEND SYSTEM_INCLUDE_DIRECTORIES ${${_v}_INCLUDE_DIR})
879 else()
880 list(APPEND _libraries ${_l})
881 endif()
882 endforeach()
883 set(LIBRARIES ${_libraries})
884
885 set(_public_libraries)
886 foreach(_l ${PUBLIC_LIBRARIES})
887 if(${_l} MATCHES "^find-")
888 string(REGEX REPLACE "^find-" "" _v "${_l}")
889 list(APPEND _public_libraries ${${_v}_LIBRARIES})
890 list(APPEND SYSTEM_INCLUDE_DIRECTORIES ${${_v}_INCLUDE_DIR})
891 else()
892 list(APPEND _public_libraries ${_l})
893 endif()
894 endforeach()
895 set(PUBLIC_LIBRARIES ${_public_libraries})
896
897 add_library(support-${_target} ${LIBRARY_TYPE} ${_sources} ${_headers})
898 set_target_properties(support-${_target} PROPERTIES
899 OBJECT_DEPENDS "${_obj_deps}"
900 LINK_FLAGS "${_link_flags}"
901 COMPILE_FLAGS "${_compile_flags}")
902
903 if(DEPENDENCIES)
904 add_dependencies(support-${_target} ${DEPENDENCIES})
905 endif()
906
907 if(LIBRARIES)
908 target_link_libraries(support-${_target} LINK_PRIVATE ${LIBRARIES})
909 endif()
910 if(PUBLIC_LIBRARIES)
911 target_link_libraries(support-${_target} PUBLIC ${PUBLIC_LIBRARIES})
912 endif()
913
914 target_include_directories(support-${_target} PUBLIC
915 ${INCLUDE_DIRECTORIES}
916 ${EFL_LIB_SOURCE_DIR}
917 ${EFL_LIB_BINARY_DIR}
918 )
919 if(SYSTEM_INCLUDE_DIRECTORIES)
920 target_include_directories(support-${_target} SYSTEM PUBLIC ${SYSTEM_INCLUDE_DIRECTORIES})
921 endif()
922
923 if(DEFINITIONS)
924 target_compile_definitions(support-${_target} PRIVATE ${DEFINITIONS})
925 endif()
926
927 if(NOT OUTPUT_NAME)
928 set(OUTPUT_NAME "support-${_target}")
929 endif()
930 set_target_properties(support-${_target} PROPERTIES OUTPUT_NAME ${OUTPUT_NAME})
931
932 if(VERSION AND SOVERSION)
933 set_target_properties(support-${_target} PROPERTIES
934 VERSION ${VERSION}
935 SOVERSION ${SOVERSION})
936 endif()
937
938 if(LIBRARY_TYPE STREQUAL "SHARED")
939 install(TARGETS support-${_target}
940 RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}/efl/support/v-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
941 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/efl/support/v-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR})
942 set_target_properties(support-${_target} PROPERTIES
943 LIBRARY_OUTPUT_DIRECTORY ${CMAKE_INSTALL_LIBDIR}/efl/support/v-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
944 RUNTIME_OUTPUT_DIRECTORY ${CMAKE_INSTALL_LIBDIR}/efl/support/v-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR})
945 else()
946 set_target_properties(support-${_target} PROPERTIES
947 ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_INSTALL_LIBDIR}/efl/support/v-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
948 POSITION_INDEPENDENT_CODE TRUE)
949 endif()
950
951 include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/post/${_target}.cmake OPTIONAL)
952endfunction()
953
954# EFL_LIB(Name)
955#
956# adds a library ${Name} automatically setting object/target
957# properties based on script-modifiable variables:
958# - DESCRIPTION: results in ${Name}_DESCRIPTION and fills pkg-config files.
959# - PKG_CONFIG_REQUIRES: results in ${Name}_PKG_CONFIG_REQUIRES and
960# fills pkg-config files. Elements after 'OPTIONAL' keyword are
961# optional.
962# - PKG_CONFIG_REQUIRES_PRIVATE: results in
963# ${Name}_PKG_CONFIG_REQUIRES_PRIVATE and fills pkg-config
964# files. Elements after 'OPTIONAL' keyword are optional.
965# - INCLUDE_DIRECTORIES: results in target_include_directories
966# - SYSTEM_INCLUDE_DIRECTORIES: results in target_include_directories(SYSTEM)
967# - OUTPUT_NAME
968# - SOURCES source files that are needed. Eo files should go in
969# PUBLIC_EO_FILES or EO_FILES.
970# - PUBLIC_HEADERS
971# - VERSION (defaults to project version)
972# - SOVERSION (defaults to project major version)
973# - LIBRARY_TYPE: SHARED or STATIC, defaults to SHARED
974# - OBJECT_DEPENDS: say this object depends on other files (ie: includes)
975# - DEPENDENCIES: results in add_dependencies()
976# - LIBRARIES: results in target_link_libraries(LINK_PRIVATE)
977# - PUBLIC_LIBRARIES: results in target_link_libraries(LINK_PUBLIC)
978# - DEFINITIONS: target_compile_definitions()
979# - PUBLIC_EO_FILES: the eo files will be used to build that lib, and will be installed to the filesystem
980# - EO_FILES: the eo files will be used to build that lib but not installed.
981# - COMPILE_FLAGS: extra CFLAGS to append.
982# - LINK_FLAGS: extra LDFLAGS to append.
983#
984# Defines the following variables that can be used within the included files:
985# - EFL_LIB_CURRENT to ${Name}
986# - EFL_LIB_SOURCE_DIR to source dir of ${Name} libraries
987# - EFL_LIB_BINARY_DIR to binary dir of ${Name} libraries
988# - EFL_BIN_SOURCE_DIR to source dir of ${Name} executables
989# - EFL_BIN_BINARY_DIR to binary dir of ${Name} executables
990# - EFL_MODULES_SOURCE_DIR to source dir of ${Name} modules
991# - EFL_MODULES_BINARY_DIR to binary dir of ${Name} modules
992# - EFL_TESTS_SOURCE_DIR to source dir of ${Name} tests
993# - EFL_TESTS_BINARY_DIR to binary dir of ${Name} tests
994# - EFL_UTILS_DIR to the binary dir of ${Name} utility binaries
995# (those that should exist in runtime but not visible from $PATH)
996#
997# Modules are processed like:
998# - loop for directories in src/modules/${EFL_LIB_CURRENT}:
999# - if a src/modules/${EFL_LIB_CURRENT}/${Module}/CMakeLists.txt
1000# use variables as documented in EFL_MODULE()
1001# - otherwise loop for scoped-modules in
1002# src/modules/${EFL_LIB_CURRENT}/${EFL_MODULE_SCOPE}/CMakeLists.txt
1003# and use variables as documented in EFL_MODULE()
1004#
1005# EFL_MODULE() will handle MODULE_TYPE=ON;OFF;STATIC, handling
1006# dependencies and installation in the proper path, considering
1007# ${EFL_MODULE_SCOPE} whenever it's set.
1008#
1009# Binaries and tests are processed similarly:
1010# - if src/bin/${EFL_LIB_CURRENT}/CMakeLists.txt exist, then use
1011# variables as documented in EFL_BIN() or EFL_TEST(). The target
1012# will be called ${EFL_LIB_CURRENT}-bin or ${EFL_LIB_CURRENT}-test
1013# and the test OUTPUT_NAME defaults to ${EFL_LIB_CURRENT}_suite.
1014# - otherwise loop for directories in src/bin/${EFL_LIB_CURRENT} and
1015# for each src/bin/${EFL_LIB_CURRENT}/${Entry}/CMakeLists.txt use
1016# variables as documented in EFL_BIN() or EFL_TEST(). Binaries
1017# must provide an unique name that will be used as both target and
1018# OUTPUT_NAME. Tests will generate targets
1019# ${EFL_LIB_CURRENT}-test-${Entry}, while OUTPUT_NAME is ${Entry}.
1020#
1021# NOTE: src/modules/${EFL_LIB_CURRENT}/CMakeLists.txt is not
1022# allowed as it makes no sense to have a single module named
1023# after the library.
1024#
1025function(EFL_LIB _target)
1026 set(EFL_LIB_CURRENT ${_target})
1027 set(EFL_LIB_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/lib/${_target})
1028 set(EFL_LIB_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/src/lib/${_target})
1029 set(EFL_BIN_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/bin/${_target})
1030 set(EFL_BIN_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/src/bin/${_target})
1031 set(EFL_MODULES_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/modules/${_target})
1032 set(EFL_MODULES_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/src/modules/${_target})
1033 set(EFL_TESTS_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/tests/${_target})
1034 set(EFL_TESTS_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/src/tests/${_target})
1035 set(EFL_UTILS_DIR ${CMAKE_INSTALL_LIBDIR}/${_target}/utils/v-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR})
1036
1037 unset(EFL_ALL_OPTIONS_${EFL_LIB_CURRENT} CACHE)
1038
1039 set(DESCRIPTION)
1040 set(PKG_CONFIG_REQUIRES)
1041 set(PKG_CONFIG_REQUIRES_PRIVATE)
1042 set(PKG_CONFIG_NAME)
1043 set(INCLUDE_DIRECTORIES)
1044 set(SYSTEM_INCLUDE_DIRECTORIES)
1045 set(OUTPUT_NAME)
1046 set(SOURCES)
1047 set(PUBLIC_HEADERS)
1048 set(VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH})
1049 set(SOVERSION ${PROJECT_VERSION_MAJOR})
1050 set(LIBRARY_TYPE SHARED)
1051 set(OBJECT_DEPENDS)
1052 set(DEPENDENCIES)
1053 set(LIBRARIES)
1054 set(PUBLIC_LIBRARIES)
1055 set(DEFINITIONS)
1056 set(PUBLIC_EO_FILES)
1057 set(EO_FILES)
1058 set(COMPILE_FLAGS)
1059 set(LINK_FLAGS)
1060
1061 string(TOUPPER "${_target}" _target_uc)
1062
1063 include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/config/${_target}.cmake OPTIONAL)
1064 include(${EFL_LIB_SOURCE_DIR}/CMakeLists.txt OPTIONAL)
1065 if(LIBRARY_TYPE STREQUAL SHARED AND NOT PUBLIC_HEADERS)
1066 message(FATAL_ERROR "Shared libraries must install public headers!")
1067 endif()
1068
1069 if(NOT PKG_CONFIG_NAME)
1070 string(REPLACE "_" "-" PKG_CONFIG_NAME ${EFL_LIB_CURRENT})
1071 endif()
1072
1073 #merge public eo files into sources
1074 set(SOURCES ${SOURCES} ${PUBLIC_EO_FILES} ${EO_FILES})
1075
1076 EFL_FILES_TO_ABSOLUTE(_headers ${EFL_LIB_SOURCE_DIR} ${EFL_LIB_BINARY_DIR}
1077 ${PUBLIC_HEADERS})
1078 EFL_FILES_TO_ABSOLUTE(_sources ${EFL_LIB_SOURCE_DIR} ${EFL_LIB_BINARY_DIR}
1079 ${SOURCES})
1080 EFL_FILES_TO_ABSOLUTE(_obj_deps ${EFL_LIB_SOURCE_DIR} ${EFL_LIB_BINARY_DIR}
1081 ${OBJECT_DEPENDS})
1082 EFL_FILES_TO_ABSOLUTE(_public_eo_files ${EFL_LIB_SOURCE_DIR} ${EFL_LIB_BINARY_DIR}
1083 ${PUBLIC_EO_FILES})
1084 EFL_FILES_TO_ABSOLUTE(_eo_files ${EFL_LIB_SOURCE_DIR} ${EFL_LIB_BINARY_DIR}
1085 ${EO_FILES})
1086
1087 foreach(public_eo_file ${PUBLIC_EO_FILES})
1088 list(APPEND _headers ${EFL_LIB_BINARY_DIR}/${public_eo_file}.h)
1089 endforeach()
1090 unset(public_eo_file)
1091
1092 EFL_PKG_CONFIG_EVAL(${_target} "${PKG_CONFIG_REQUIRES_PRIVATE}" "${PKG_CONFIG_REQUIRES}")
1093
1094 set(__link_flags ${${_target}_PKG_CONFIG_REQUIRES_PRIVATE_LDFLAGS} ${${_target}_PKG_CONFIG_REQUIRES_LDFLAGS} ${LINK_FLAGS})
1095 set(__compile_flags ${${_target}_PKG_CONFIG_REQUIRES_PRIVATE_CFLAGS} ${${_target}_PKG_CONFIG_REQUIRES_CFLAGS} -DPACKAGE_DATA_DIR=\\"${CMAKE_INSTALL_FULL_DATADIR}/${_target}/\\" ${COMPILE_FLAGS})
1096
1097 set(_link_flags)
1098 foreach(_l ${__link_flags})
1099 set(_link_flags "${_link_flags} ${_l}")
1100 endforeach()
1101
1102 set(_compile_flags)
1103 foreach(_c ${__compile_flags})
1104 set(_compile_flags "${_compile_flags} ${_c}")
1105 endforeach()
1106
1107 set(_libraries)
1108 foreach(_l ${LIBRARIES})
1109 if(${_l} MATCHES "^find-")
1110 string(REGEX REPLACE "^find-" "" _v "${_l}")
1111 list(APPEND _libraries ${${_v}_LIBRARIES})
1112 list(APPEND SYSTEM_INCLUDE_DIRECTORIES ${${_v}_INCLUDE_DIR})
1113 else()
1114 list(APPEND _libraries ${_l})
1115 endif()
1116 endforeach()
1117 set(LIBRARIES ${_libraries})
1118
1119 set(_public_libraries)
1120 foreach(_l ${PUBLIC_LIBRARIES})
1121 if(${_l} MATCHES "^find-")
1122 string(REGEX REPLACE "^find-" "" _v "${_l}")
1123 list(APPEND _public_libraries ${${_v}_LIBRARIES})
1124 list(APPEND SYSTEM_INCLUDE_DIRECTORIES ${${_v}_INCLUDE_DIR})
1125 else()
1126 list(APPEND _public_libraries ${_l})
1127 endif()
1128 endforeach()
1129 set(PUBLIC_LIBRARIES ${_public_libraries})
1130
1131 add_library(${_target} ${LIBRARY_TYPE} ${_sources} ${_headers})
1132 set_target_properties(${_target} PROPERTIES
1133 FRAMEWORK TRUE
1134 DEFINE_SYMBOL "EFL_${_target_uc}_BUILD"
1135 PUBLIC_HEADER "${_headers}"
1136 OBJECT_DEPENDS "${_obj_deps}"
1137 EFL_EO_PRIVATE "${_eo_files}"
1138 EFL_EO_PUBLIC "${_public_eo_files}"
1139 PKG_CONFIG_NAME "${PKG_CONFIG_NAME}"
1140 LINK_FLAGS "${_link_flags}"
1141 COMPILE_FLAGS "${_compile_flags} -DDLL_EXPORT")
1142
1143 if(DEPENDENCIES)
1144 add_dependencies(${_target} ${DEPENDENCIES})
1145 endif()
1146
1147 if(LIBRARIES)
1148 target_link_libraries(${_target} LINK_PRIVATE ${LIBRARIES})
1149 endif()
1150 if(PUBLIC_LIBRARIES)
1151 target_link_libraries(${_target} PUBLIC ${PUBLIC_LIBRARIES})
1152 endif()
1153
1154 target_include_directories(${_target} PUBLIC
1155 ${INCLUDE_DIRECTORIES}
1156 ${EFL_LIB_SOURCE_DIR}
1157 ${EFL_LIB_BINARY_DIR}
1158 )
1159 if(SYSTEM_INCLUDE_DIRECTORIES)
1160 target_include_directories(${_target} SYSTEM PUBLIC ${SYSTEM_INCLUDE_DIRECTORIES})
1161 endif()
1162
1163 if(DEFINITIONS)
1164 target_compile_definitions(${_target} PRIVATE ${DEFINITIONS})
1165 endif()
1166
1167 if(OUTPUT_NAME)
1168 set_target_properties(${_target} PROPERTIES OUTPUT_NAME ${OUTPUT_NAME})
1169 endif()
1170
1171 if(VERSION AND SOVERSION)
1172 set_target_properties(${_target} PROPERTIES
1173 VERSION ${VERSION}
1174 SOVERSION ${SOVERSION})
1175 endif()
1176
1177 EFL_CREATE_EO_RULES(${_target} ${EFL_LIB_SOURCE_DIR} ${EFL_LIB_BINARY_DIR})
1178
1179 EFL_PKG_CONFIG_LIB_WRITE()
1180
1181 install(TARGETS ${_target}
1182 PUBLIC_HEADER DESTINATION include/${_target}-${PROJECT_VERSION_MAJOR}
1183 RUNTIME DESTINATION bin
1184 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
1185 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
1186 install(FILES
1187 ${_public_eo_files} DESTINATION share/eolian/include/${_target}-${PROJECT_VERSION_MAJOR}
1188 )
1189
1190 file(WRITE ${CMAKE_BINARY_DIR}/share/${_target}/checkme "")
1191 install(FILES ${CMAKE_BINARY_DIR}/share/${_target}/checkme DESTINATION share/${_target})
1192
1193 # do not leak those into binaries, modules or tests
1194 unset(_sources)
1195 unset(_headers)
1196 unset(_obj_deps)
1197 unset(_public_eo_files)
1198 unset(_eo_files)
1199 unset(INCLUDE_DIRECTORIES)
1200 unset(SYSTEM_INCLUDE_DIRECTORIES)
1201 unset(OUTPUT_NAME)
1202 unset(SOURCES)
1203 unset(PUBLIC_HEADERS)
1204 unset(VERSION)
1205 unset(SOVERSION)
1206 unset(LIBRARY_TYPE)
1207 unset(OBJECT_DEPENDS)
1208 unset(DEPENDENCIES)
1209 unset(LIBRARIES)
1210 unset(PUBLIC_LIBRARIES)
1211 unset(DEFINITIONS)
1212 unset(DESCRIPTION)
1213 unset(PUBLIC_EO_FILES)
1214 unset(EO_FILES)
1215 unset(PKG_CONFIG_REQUIRES)
1216 unset(PKG_CONFIG_REQUIRES_PRIVATE)
1217 unset(PKG_CONFIG_NAME)
1218
1219 _EFL_LIB_PROCESS_BINS_INTERNAL()
1220 _EFL_LIB_PROCESS_MODULES_INTERNAL()
1221 _EFL_LIB_PROCESS_TESTS_INTERNAL()
1222
1223 include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/post/${_target}.cmake OPTIONAL)
1224
1225 LIST_APPEND_GLOBAL(EFL_ALL_LIBS ${_target})
1226endfunction()
1227
1228# EFL_BIN(Name)
1229#
1230# Adds a binary (executable) for ${EFL_LIB_CURRENT} using
1231# ${EFL_BIN_SOURCE_DIR} and ${EFL_BIN_BINARY_DIR}
1232#
1233# Settings:
1234# - INCLUDE_DIRECTORIES: results in target_include_directories
1235# - SYSTEM_INCLUDE_DIRECTORIES: results in target_include_directories(SYSTEM)
1236# - OUTPUT_NAME
1237# - SOURCES
1238# - OBJECT_DEPENDS: say this object depends on other files (ie: includes)
1239# - DEPENDENCIES: results in add_dependencies(), defaults to
1240# ${EFL_LIB_CURRENT}-modules
1241# - LIBRARIES: results in target_link_libraries()
1242# - DEFINITIONS: target_compile_definitions()
1243# - INSTALL_DIR: defaults to bin. If empty, won't install.
1244# - COMPILE_FLAGS: extra CFLAGS to append.
1245# - LINK_FLAGS: extra LDFLAGS to append.
1246# - EFL_UTILITY: if ON, will be installed to EFL_UTILS_DIR instead of
1247# bin, not being exposed to $PATH.
1248#
1249# NOTE: it's meant to be called by files included by EFL_LIB() or similar,
1250# otherwise you need to prepare the environment yourself.
1251function(EFL_BIN _binname)
1252 set(INCLUDE_DIRECTORIES)
1253 set(SYSTEM_INCLUDE_DIRECTORIES)
1254 set(OUTPUT_NAME ${_binname})
1255 set(SOURCES)
1256 set(OBJECT_DEPENDS)
1257 if(TARGET ${EFL_LIB_CURRENT}-modules)
1258 set(DEPENDENCIES ${EFL_LIB_CURRENT}-modules)
1259 else()
1260 set(DEPENDENCIES)
1261 endif()
1262 set(LIBRARIES)
1263 set(DEFINITIONS)
1264 set(INSTALL ON)
1265 set(INSTALL_DIR bin)
1266 set(PKG_CONFIG_REQUIRES)
1267 set(PKG_CONFIG_REQUIRES_PRIVATE)
1268 set(COMPILE_FLAGS)
1269 set(LINK_FLAGS)
1270 set(EFL_UTILITY OFF)
1271
1272 if(_binname STREQUAL ${EFL_LIB_CURRENT})
1273 set(_binsrcdir "${EFL_BIN_SOURCE_DIR}")
1274 set(_binbindir "${EFL_BIN_BINARY_DIR}")
1275 set(_bintarget "${EFL_LIB_CURRENT}-bin") # otherwise target would exist
1276 else()
1277 set(_binsrcdir "${EFL_BIN_SOURCE_DIR}/${_binname}")
1278 set(_binbindir "${EFL_BIN_BINARY_DIR}/${_binname}")
1279 set(_bintarget "${_binname}")
1280 endif()
1281
1282 _EFL_INCLUDE_OR_DETECT("Binary ${_bintarget}" ${_binsrcdir})
1283
1284 if(NOT SOURCES)
1285 message(WARNING "${_binsrcdir}/CMakeLists.txt defines no SOURCES")
1286 return()
1287 endif()
1288 if(PUBLIC_HEADERS)
1289 message(WARNING "${_binsrcdir}/CMakeLists.txt should not define PUBLIC_HEADERS, it's not to be installed.")
1290 endif()
1291 if(PKG_CONFIG_REQUIRES)
1292 message(WARNING "${_binsrcdir}/CMakeLists.txt should not define PKG_CONFIG_REQUIRES. Use PKG_CONFIG_REQUIRES_PRIVATE instead")
1293 endif()
1294
1295 if(EFL_UTILITY AND INSTALL_DIR STREQUAL "bin")
1296 set(INSTALL_DIR ${EFL_UTILS_DIR})
1297 endif()
1298
1299 EFL_FILES_TO_ABSOLUTE(_sources ${_binsrcdir} ${_binbindir} ${SOURCES})
1300 EFL_FILES_TO_ABSOLUTE(_obj_deps ${_binsrcdir} ${_binbindir} ${OBJECT_DEPENDS})
1301
1302 EFL_PKG_CONFIG_EVAL(${_bintarget} "${PKG_CONFIG_REQUIRES_PRIVATE}" "")
1303
1304 set(_libraries)
1305 foreach(_l ${LIBRARIES})
1306 if(${_l} MATCHES "^find-")
1307 string(REGEX REPLACE "^find-" "" _v "${_l}")
1308 list(APPEND _libraries ${${_v}_LIBRARIES})
1309 list(APPEND SYSTEM_INCLUDE_DIRECTORIES ${${_v}_INCLUDE_DIR})
1310 else()
1311 list(APPEND _libraries ${_l})
1312 endif()
1313 endforeach()
1314 set(LIBRARIES ${_libraries})
1315
1316 add_executable(${_bintarget} ${_sources})
1317
1318 if(_obj_deps)
1319 set_target_properties(${_bintarget} PROPERTIES
1320 OBJECT_DEPENDS "${_obj_deps}")
1321 endif()
1322
1323 if(DEPENDENCIES)
1324 add_dependencies(${_bintarget} ${DEPENDENCIES})
1325 endif()
1326
1327 target_include_directories(${_bintarget} PRIVATE
1328 ${_binrcdir}
1329 ${_binbindir}
1330 ${INCLUDE_DIRECTORIES})
1331 if(SYSTEM_INCLUDE_DIRECTORIES)
1332 target_include_directories(${_bintarget} SYSTEM PRIVATE
1333 ${SYSTEM_INCLUDE_DIRECTORIES})
1334 endif()
1335 target_link_libraries(${_bintarget} LINK_PRIVATE
1336 ${EFL_LIB_CURRENT}
1337 ${LIBRARIES})
1338
1339 if(DEFINITIONS)
1340 target_compile_definitions(${_bintarget} PRIVATE ${DEFINITIONS})
1341 endif()
1342
1343 if(OUTPUT_NAME)
1344 set_target_properties(${_bintarget} PROPERTIES OUTPUT_NAME ${OUTPUT_NAME})
1345 endif()
1346
1347 set(_link_flags)
1348 foreach(_l ${${_bintarget}_PKG_CONFIG_REQUIRES_PRIVATE_LDFLAGS} ${LINK_FLAGS})
1349 set(_link_flags "${_link_flags} ${_l}")
1350 endforeach()
1351
1352 set(_compile_flags)
1353 foreach(_c ${${_bintarget}_PKG_CONFIG_REQUIRES_PRIVATE_CFLAGS} ${COMPILE_FLAGS})
1354 set(_compile_flags "${_compile_flags} ${_c}")
1355 endforeach()
1356
1357 set_target_properties(${_bintarget} PROPERTIES
1358 LINK_FLAGS "${_link_flags}"
1359 COMPILE_FLAGS "${_compile_flags} -DPACKAGE_DATA_DIR=\\\"${CMAKE_INSTALL_FULL_DATADIR}/${_target}/\\\" -DPACKAGE_SRC_DIR=\\\"${CMAKE_SOURCE_DIR}/\\\"")
1360
1361 if(INSTALL_DIR)
1362 install(TARGETS ${_bintarget} RUNTIME DESTINATION ${INSTALL_DIR})
1363 set_target_properties(${_bintarget} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${INSTALL_DIR})
1364 endif()
1365
1366 LIST_APPEND_GLOBAL(${EFL_LIB_CURRENT}_BINS ${_bintarget})
1367endfunction()
1368
1369# EFL_TEST(Name)
1370#
1371# Adds a test for ${EFL_LIB_CURRENT} using
1372# ${EFL_TESTS_SOURCE_DIR} and ${EFL_TESTS_BINARY_DIR}
1373#
1374# Settings:
1375# - INCLUDE_DIRECTORIES: results in target_include_directories
1376# - SYSTEM_INCLUDE_DIRECTORIES: results in target_include_directories(SYSTEM)
1377# - OUTPUT_NAME
1378# - SOURCES
1379# - OBJECT_DEPENDS: say this object depends on other files (ie: includes)
1380# - DEPENDENCIES: results in add_dependencies(), defaults to
1381# ${EFL_LIB_CURRENT}-modules
1382# - LIBRARIES: results in target_link_libraries()
1383# - DEFINITIONS: target_compile_definitions()
1384# - COMPILE_FLAGS: extra CFLAGS to append.
1385# - LINK_FLAGS: extra LDFLAGS to append.
1386#
1387# NOTE: it's meant to be called by files included by EFL_LIB() or similar,
1388# otherwise you need to prepare the environment yourself.
1389function(EFL_TEST _testname)
1390 if(NOT CHECK_FOUND)
1391 message(STATUS "${EFL_LIB_CURRENT} test ${_testname} ignored since no 'check' library was found.")
1392 return()
1393 endif()
1394
1395 set(INCLUDE_DIRECTORIES)
1396 set(SYSTEM_INCLUDE_DIRECTORIES)
1397 set(OUTPUT_NAME ${_testname})
1398 set(SOURCES)
1399 set(OBJECT_DEPENDS)
1400 if(TARGET ${EFL_LIB_CURRENT}-modules)
1401 set(DEPENDENCIES ${EFL_LIB_CURRENT}-modules)
1402 else()
1403 set(DEPENDENCIES)
1404 endif()
1405 set(LIBRARIES)
1406 set(DEFINITIONS)
1407 set(PKG_CONFIG_REQUIRES)
1408 set(PKG_CONFIG_REQUIRES_PRIVATE)
1409 set(COMPILE_FLAGS)
1410 set(LINK_FLAGS)
1411
1412 if(_testname STREQUAL ${EFL_LIB_CURRENT})
1413 set(_testsrcdir "${EFL_TESTS_SOURCE_DIR}")
1414 set(_testbindir "${EFL_TESTS_BINARY_DIR}")
1415 set(_testtarget "${EFL_LIB_CURRENT}-test") # otherwise target would exist
1416 set(OUTPUT_NAME "${EFL_LIB_CURRENT}_suite") # backward compatible
1417 elseif(_testname STREQUAL "suite")
1418 set(_testsrcdir "${EFL_TESTS_SOURCE_DIR}/${_testname}")
1419 set(_testbindir "${EFL_TESTS_BINARY_DIR}/${_testname}")
1420 set(_testtarget "${EFL_LIB_CURRENT}-test") # target for main test, as above
1421 set(OUTPUT_NAME "${EFL_LIB_CURRENT}_suite") # backward compatible
1422 else()
1423 set(_testsrcdir "${EFL_TESTS_SOURCE_DIR}/${_testname}")
1424 set(_testbindir "${EFL_TESTS_BINARY_DIR}/${_testname}")
1425 set(_testtarget "${EFL_LIB_CURRENT}-test-${_testname}")
1426 endif()
1427
1428 _EFL_INCLUDE_OR_DETECT("Test ${_testtarget}" ${_testsrcdir})
1429
1430 if(NOT SOURCES)
1431 message(WARNING "${_testsrcdir}/CMakeLists.txt defines no SOURCES")
1432 return()
1433 endif()
1434 if(PUBLIC_HEADERS)
1435 message(WARNING "${_testsrcdir}/CMakeLists.txt should not define PUBLIC_HEADERS, it's not to be installed.")
1436 endif()
1437 if(PKG_CONFIG_REQUIRES)
1438 message(WARNING "${_testsrcdir}/CMakeLists.txt should not define PKG_CONFIG_REQUIRES. Use PKG_CONFIG_REQUIRES_PRIVATE instead")
1439 endif()
1440
1441 EFL_FILES_TO_ABSOLUTE(_sources ${_testsrcdir} ${_testbindir} ${SOURCES})
1442 EFL_FILES_TO_ABSOLUTE(_obj_deps ${_testsrcdir} ${_testbindir} ${OBJECT_DEPENDS})
1443
1444 EFL_PKG_CONFIG_EVAL(${_testtarget} "${PKG_CONFIG_REQUIRES_PRIVATE}" "")
1445
1446 set(_libraries)
1447 foreach(_l ${LIBRARIES})
1448 if(${_l} MATCHES "^find-")
1449 string(REGEX REPLACE "^find-" "" _v "${_l}")
1450 list(APPEND _libraries ${${_v}_LIBRARIES})
1451 list(APPEND SYSTEM_INCLUDE_DIRECTORIES ${${_v}_INCLUDE_DIR})
1452 else()
1453 list(APPEND _libraries ${_l})
1454 endif()
1455 endforeach()
1456 set(LIBRARIES ${_libraries})
1457
1458 add_executable(${_testtarget} EXCLUDE_FROM_ALL ${_sources})
1459
1460 if(_obj_deps)
1461 set_target_properties(${_testtarget} PROPERTIES
1462 OBJECT_DEPENDS "${_obj_deps}")
1463 endif()
1464
1465 if(DEPENDENCIES)
1466 add_dependencies(${_testtarget} ${DEPENDENCIES})
1467 endif()
1468
1469 target_include_directories(${_testtarget} PRIVATE
1470 ${_testsrcdir}
1471 ${_testbindir}
1472 ${EFL_TESTS_SOURCE_DIR}
1473 ${EFL_TESTS_BINARY_DIR}
1474 ${INCLUDE_DIRECTORIES})
1475 target_include_directories(${_testtarget} SYSTEM PRIVATE
1476 ${SYSTEM_INCLUDE_DIRECTORIES}
1477 ${CHECK_INCLUDE_DIRS})
1478 target_link_libraries(${_testtarget} LINK_PRIVATE
1479 ${EFL_LIB_CURRENT}
1480 ${LIBRARIES}
1481 ${CHECK_LIBRARIES})
1482
1483 target_compile_definitions(${_testtarget} PRIVATE
1484 "-DPACKAGE_DATA_DIR=\"${EFL_TESTS_SOURCE_DIR}\""
1485 "-DTESTS_SRC_DIR=\"${_testsrcdir}\""
1486 "-DTESTS_BUILD_DIR=\"${_testbindir}\""
1487 "-DTESTS_WD=\"\""
1488 ${DEFINITIONS}
1489 )
1490
1491 if(OUTPUT_NAME)
1492 set_target_properties(${_testtarget} PROPERTIES OUTPUT_NAME ${OUTPUT_NAME})
1493 endif()
1494
1495 set(_link_flags)
1496 foreach(_l ${${_testtarget}_PKG_CONFIG_REQUIRES_PRIVATE_LDFLAGS} ${LINK_FLAGS})
1497 set(_link_flags "${_link_flags} ${_l}")
1498 endforeach()
1499
1500 set(_compile_flags)
1501 foreach(_c ${${_testtarget}_PKG_CONFIG_REQUIRES_PRIVATE_CFLAGS} ${COMPILE_FLAGS})
1502 set(_compile_flags "${_compile_flags} ${_c}")
1503 endforeach()
1504
1505 set_target_properties(${_testtarget} PROPERTIES
1506 LINK_FLAGS "${_link_flags}"
1507 COMPILE_FLAGS "${_compile_flags}"
1508 LIBRARY_OUTPUT_DIRECTORY "${_testbindir}"
1509 RUNTIME_OUTPUT_DIRECTORY "${_testbindir}")
1510
1511 add_test(NAME ${_testtarget} COMMAND ${_testtarget})
1512 LIST_APPEND_GLOBAL(${EFL_LIB_CURRENT}_TESTS ${_testtarget})
1513
1514 add_test(${_testtarget}-build "${CMAKE_COMMAND}" --build ${CMAKE_BINARY_DIR} --target ${_testtarget})
1515 set_tests_properties(${_testtarget} PROPERTIES DEPENDS ${_testtarget}-build)
1516endfunction()
1517
1518# EFL_MODULE(Name)
1519#
1520# Adds a module for ${EFL_LIB_CURRENT} using
1521# ${EFL_MODULES_SOURCE_DIR} and ${EFL_MODULES_BINARY_DIR}
1522# as well as ${EFL_MODULE_SCOPE} if it's contained into
1523# a subdir, such as eina's "mp" or evas "engines".
1524#
1525# To keep it simple to use, user is only expected to define variables:
1526# - SOURCES
1527# - OBJECT_DEPENDS
1528# - LIBRARIES
1529# - INCLUDE_DIRECTORIES
1530# - SYSTEM_INCLUDE_DIRECTORIES
1531# - DEFINITIONS
1532# - MODULE_TYPE: one of ON;OFF;STATIC, defaults to ON
1533# - INSTALL_DIR: defaults to
1534# ${CMAKE_INSTALL_LIBDIR}/${EFL_LIB_CURRENT}/modules/${EFL_MODULE_SCOPE}/${Name}/v-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}/.
1535# If empty, won't install.
1536# - PKG_CONFIG_REQUIRES_PRIVATE: results in
1537# ${Name}_PKG_CONFIG_REQUIRES_PRIVATE. Elements after 'OPTIONAL'
1538# keyword are optional.
1539# - COMPILE_FLAGS: extra CFLAGS to append.
1540# - LINK_FLAGS: extra LDFLAGS to append.
1541#
1542# NOTE: since the file will be included it shouldn't mess with global variables!
1543function(EFL_MODULE _modname)
1544 if(EFL_MODULE_SCOPE)
1545 set(_modsrcdir ${EFL_MODULES_SOURCE_DIR}/${EFL_MODULE_SCOPE}/${_modname})
1546 set(_modoutdir ${CMAKE_INSTALL_LIBDIR}/${EFL_LIB_CURRENT}/modules/${EFL_MODULE_SCOPE}/${_modname}/v-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR})
1547 set(_modbindir ${EFL_MODULES_BINARY_DIR}/${EFL_MODULE_SCOPE}/${_modname})
1548 set(_modtarget ${EFL_LIB_CURRENT}-module-${EFL_MODULE_SCOPE}-${_modname})
1549 string(TOUPPER "${EFL_LIB_CURRENT}_MODULE_TYPE_${EFL_MODULE_SCOPE}_${_modname}" _modoptionname)
1550 if(NOT DEFINED ${_modoptionname}_DEFAULT)
1551 set(${_modoptionname}_DEFAULT "ON")
1552 endif()
1553 EFL_OPTION(${_modoptionname} "Build ${EFL_LIB_CURRENT} module ${EFL_MODULE_SCOPE}/${_modname}" ${${_modoptionname}_DEFAULT} CHOICE ON;OFF;STATIC)
1554 else()
1555 set(_modsrcdir ${EFL_MODULES_SOURCE_DIR}/${_modname})
1556 set(_modoutdir ${CMAKE_INSTALL_LIBDIR}/${EFL_LIB_CURRENT}/modules/${_modname}/v-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR})
1557 set(_modbindir ${EFL_MODULES_BINARY_DIR}/${_modname})
1558 set(_modtarget ${EFL_LIB_CURRENT}-module-${_modname})
1559 string(TOUPPER "${EFL_LIB_CURRENT}_MODULE_TYPE_${_modname}" _modoptionname)
1560 if(NOT DEFINED ${_modoptionname}_DEFAULT)
1561 set(${_modoptionname}_DEFAULT "ON")
1562 endif()
1563 EFL_OPTION(${_modoptionname} "Build ${EFL_LIB_CURRENT} module ${_modname}" ${${_modoptionname}_DEFAULT} CHOICE ON;OFF;STATIC)
1564 endif()
1565
1566 set(SOURCES)
1567 set(OBJECT_DEPENDS)
1568 set(LIBRARIES)
1569 set(INCLUDE_DIRECTORIES)
1570 set(SYSTEM_INCLUDE_DIRECTORIES)
1571 set(DEFINITIONS)
1572 set(MODULE_TYPE "${${_modoptionname}}")
1573 set(INSTALL_DIR ${_modoutdir})
1574 set(PKG_CONFIG_REQUIRES)
1575 set(PKG_CONFIG_REQUIRES_PRIVATE)
1576 set(COMPILE_FLAGS)
1577 set(LINK_FLAGS)
1578
1579 _EFL_INCLUDE_OR_DETECT("Module ${_modtarget}" ${_modsrcdir})
1580
1581 if(NOT SOURCES)
1582 message(WARNING "${_modsrcdir}/CMakeLists.txt defines no SOURCES")
1583 return()
1584 endif()
1585 if(PUBLIC_HEADERS)
1586 message(WARNING "${_modsrcdir}/CMakeLists.txt should not define PUBLIC_HEADERS, it's not to be installed.")
1587 endif()
1588 if(PKG_CONFIG_REQUIRES)
1589 message(WARNING "${_modsrcdir}/CMakeLists.txt should not define PKG_CONFIG_REQUIRES. Use PKG_CONFIG_REQUIRES_PRIVATE instead")
1590 endif()
1591
1592 if("${MODULE_TYPE}" STREQUAL "OFF")
1593 return()
1594 elseif("${MODULE_TYPE}" STREQUAL "STATIC")
1595 set(_modtype STATIC)
1596 else()
1597 set(_modtype MODULE)
1598 endif()
1599
1600 EFL_FILES_TO_ABSOLUTE(_sources ${_modsrcdir} ${_modbindir} ${SOURCES})
1601 EFL_FILES_TO_ABSOLUTE(_obj_deps ${_modsrcdir} ${_modbindir} ${OBJECT_DEPENDS})
1602
1603 EFL_PKG_CONFIG_EVAL(${_modtarget} "${PKG_CONFIG_REQUIRES_PRIVATE}" "")
1604
1605 set(_libraries)
1606 foreach(_l ${LIBRARIES})
1607 if(${_l} MATCHES "^find-")
1608 string(REGEX REPLACE "^find-" "" _v "${_l}")
1609 list(APPEND _libraries ${${_v}_LIBRARIES})
1610 list(APPEND SYSTEM_INCLUDE_DIRECTORIES ${${_v}_INCLUDE_DIR})
1611 else()
1612 list(APPEND _libraries ${_l})
1613 endif()
1614 endforeach()
1615 set(LIBRARIES ${_libraries})
1616
1617 add_library(${_modtarget} ${_modtype} ${_sources})
1618 set_target_properties(${_modtarget} PROPERTIES
1619 OBJECT_DEPENDS "${_obj_deps}"
1620 PREFIX ""
1621 OUTPUT_NAME "module")
1622
1623 target_include_directories(${_modtarget} PRIVATE
1624 ${_modsrcdir}
1625 ${_modbindir}
1626 ${INCLUDE_DIRECTORIES})
1627 target_include_directories(${_modtarget} SYSTEM PUBLIC
1628 ${SYSTEM_INCLUDE_DIRECTORIES})
1629 target_link_libraries(${_modtarget} LINK_PRIVATE ${LIBRARIES})
1630
1631 target_compile_definitions(${_modtarget} PRIVATE ${DEFINITIONS})
1632
1633 set(_link_flags)
1634 foreach(_l ${${_modtarget}_PKG_CONFIG_REQUIRES_PRIVATE_LDFLAGS} ${LINK_FLAGS})
1635 set(_link_flags "${_link_flags} ${_l}")
1636 endforeach()
1637
1638 set(_compile_flags)
1639 foreach(_c ${${_modtarget}_PKG_CONFIG_REQUIRES_PRIVATE_CFLAGS} ${COMPILE_FLAGS})
1640 set(_compile_flags "${_compile_flags} ${_c}")
1641 endforeach()
1642
1643 set_target_properties(${_modtarget} PROPERTIES
1644 LINK_FLAGS "${_link_flags}"
1645 COMPILE_FLAGS "${_compile_flags}"
1646 LIBRARY_OUTPUT_DIRECTORY "${_modoutdir}"
1647 ARCHIVE_OUTPUT_DIRECTORY "${_modoutdir}"
1648 RUNTIME_OUTPUT_DIRECTORY "${_modoutdir}")
1649
1650 if("${MODULE_TYPE}" STREQUAL "STATIC")
1651 target_link_libraries(${EFL_LIB_CURRENT} LINK_PRIVATE ${_modtarget})
1652 target_compile_definitions(${EFL_LIB_CURRENT} PRIVATE "-D${_modoptionname}_STATIC=1")
1653 target_include_directories(${_modtarget} PRIVATE
1654 ${EFL_LIB_SOURCE_DIR}
1655 ${EFL_LIB_BINARY_DIR})
1656 set_target_properties(${_modtarget} PROPERTIES
1657 POSITION_INDEPENDENT_CODE TRUE)
1658
1659 LIST_APPEND_GLOBAL(${EFL_LIB_CURRENT}_STATIC_MODULES ${_modtarget})
1660 else()
1661 target_link_libraries(${_modtarget} LINK_PRIVATE ${EFL_LIB_CURRENT})
1662 target_compile_definitions(${EFL_LIB_CURRENT} PRIVATE "-D${_modoptionname}_DYNAMIC=1")
1663 LIST_APPEND_GLOBAL(${EFL_LIB_CURRENT}_MODULES ${_modtarget})
1664 if(INSTALL_DIR)
1665 install(TARGETS ${_modtarget} LIBRARY DESTINATION "${INSTALL_DIR}")
1666 endif()
1667 endif()
1668endfunction()
1669
1670macro(EFL_PROJECT version)
1671 if ("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
1672 project(efl VERSION ${version})
1673 else ("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
1674 execute_process(
1675 COMMAND git rev-list --count HEAD
1676 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
1677 OUTPUT_VARIABLE GIT_VERSION
1678 OUTPUT_STRIP_TRAILING_WHITESPACE
1679 )
1680 project(efl VERSION ${version}.${GIT_VERSION})
1681 endif ("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
1682 message("VERSION ${PROJECT_VERSION}")
1683endmacro()
1684
1685# Will use the source of the given target to create rules for creating
1686# the .eo.c and .eo.h files. The INCLUDE_DIRECTORIES of the target will be used
1687function(EFL_CREATE_EO_RULES target source_dir generation_dir)
1688 get_target_property(eo_files_private ${target} EFL_EO_PRIVATE)
1689 get_target_property(eo_files_public ${target} EFL_EO_PUBLIC)
1690 if(NOT eo_files_private AND NOT eo_files_public)
1691 return()
1692 endif()
1693
1694 get_target_property(link_libraries ${target} LINK_LIBRARIES)
1695 set(all_libraries ${target} ${link_libraries})
1696 set(include_cmd "")
1697 foreach(link_target ${all_libraries})
1698 if(TARGET ${link_target})
1699 list(APPEND include_cmd -I${CMAKE_SOURCE_DIR}/src/lib/${link_target})
1700 endif()
1701 endforeach()
1702
1703 set(all_eo_gen_files "")
1704 set(extra_include_dirs "")
1705 foreach(file ${eo_files_private} ${eo_files_public})
1706 get_filename_component(ext ${file} EXT)
1707 string(REGEX REPLACE "^${source_dir}/" "" filename "${file}")
1708 string(REGEX REPLACE "^${CMAKE_SOURCE_DIR}/" "" relfile "${file}")
1709
1710 # if sources are located in subdiretories
1711 get_filename_component(reldir "${filename}" DIRECTORY)
1712 if(reldir)
1713 file(MAKE_DIRECTORY "${generation_dir}/${reldir}")
1714 get_filename_component(absdir "${file}" DIRECTORY)
1715 set(rel_include_cmd -I${absdir})
1716 list(APPEND extra_include_dirs "${generation_dir}/${reldir}")
1717 else()
1718 set(rel_include_cmd)
1719 endif()
1720
1721 if(${ext} STREQUAL ".eo")
1722 set(file_eo_gen_files ${generation_dir}/${filename}.c ${generation_dir}/${filename}.h ${generation_dir}/${filename}.legacy.h)
1723 set(out_cmd -gchl -o c:${generation_dir}/${filename}.c -o h:${generation_dir}/${filename}.h -o l:${generation_dir}/${filename}.legacy.h)
1724 elseif(${ext} STREQUAL ".eot")
1725 set(file_eo_gen_files ${generation_dir}/${filename}.h)
1726 set(out_cmd -gh -o h:${generation_dir}/${filename}.h)
1727 else()
1728 message(FATAL_ERROR "Unsupported eo file type: ${file}")
1729 endif()
1730
1731 #add the custom rule
1732 if(file_eo_gen_files)
1733 add_custom_command(
1734 OUTPUT ${file_eo_gen_files}
1735 COMMAND ${EOLIAN_BIN} ${rel_include_cmd} ${include_cmd} ${EOLIAN_EXTRA_PARAMS} ${out_cmd} ${file}
1736 DEPENDS ${file}
1737 COMMENT "EOLIAN ${relfile}"
1738 )
1739 list(APPEND all_eo_gen_files ${file_eo_gen_files})
1740 endif()
1741 endforeach()
1742 if(all_eo_gen_files)
1743 file(MAKE_DIRECTORY ${generation_dir})
1744 add_custom_target(${target}-eo
1745 DEPENDS ${all_eo_gen_files}
1746 )
1747 if(extra_include_dirs)
1748 list(REMOVE_DUPLICATES extra_include_dirs)
1749 target_include_directories(${target} PUBLIC ${extra_include_dirs})
1750 endif()
1751 add_dependencies(${target} ${target}-eo)
1752 if(${EOLIAN_BIN} STREQUAL ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/eolian_gen)
1753 add_dependencies(${target}-eo eolian-bin)
1754 endif()
1755 endif()
1756endfunction()
1757
1758# EFL_BACKEND_CHOICES(Prefix Choice1 .. ChoiceN)
1759#
1760# Helper that will check ${ChoiceN}_FOUND and if so append to
1761# ${_prefix}_CHOICES as well set the first found option (in order!) as
1762# ${_prefix}_DEFAULT and ${_prefix}_FOUND to ON if at least one was
1763# found.
1764function(EFL_BACKEND_CHOICES _prefix)
1765 cmake_parse_arguments(PARAMS "REQUIRED" "" "" ${ARGN})
1766
1767 set(_choices "")
1768 set(_defval "none")
1769 set(_found OFF)
1770 foreach(c ${PARAMS_UNPARSED_ARGUMENTS})
1771 if(${c}_FOUND)
1772 string(TOLOWER "${c}" c_lc)
1773 if(_defval STREQUAL "none")
1774 set(_defval ${c_lc})
1775 endif()
1776 set(_found ON)
1777 list(APPEND _choices ${c_lc})
1778 endif()
1779 endforeach()
1780
1781 if(PARAMS_REQUIRED AND NOT _found)
1782 message(FATAL_ERROR "${_prefix} backend was required (one of ${PARAMS_UNPARSED_ARGUMENTS}) but none was found!")
1783 elseif(NOT PARAMS_REQUIRED)
1784 list(APPEND _choices "none")
1785 endif()
1786
1787 set(${_prefix}_FOUND ${_found} PARENT_SCOPE)
1788 set(${_prefix}_CHOICES ${_choices} PARENT_SCOPE)
1789 set(${_prefix}_DEFAULT ${_defval} PARENT_SCOPE)
1790endfunction()
diff --git a/cmake/post/eina.cmake b/cmake/post/eina.cmake
deleted file mode 100644
index 72088d7..0000000
--- a/cmake/post/eina.cmake
+++ /dev/null
@@ -1,27 +0,0 @@
1
2# TODO: change code to avoid these
3if(EINA_MODULE_TYPE_MP_CHAINED_POOL STREQUAL "STATIC")
4 CHECK_APPEND_DEFINE(EINA_STATIC_BUILD_CHAINED_POOL 1)
5else()
6 CHECK_APPEND_DEFINE(EINA_STATIC_BUILD_CHAINED_POOL "")
7endif()
8if(EINA_MODULE_TYPE_MP_ONE_BIG STREQUAL "STATIC")
9 CHECK_APPEND_DEFINE(EINA_STATIC_BUILD_ONE_BIG 1)
10else()
11 CHECK_APPEND_DEFINE(EINA_STATIC_BUILD_ONE_BIG "")
12endif()
13if(EINA_MODULE_TYPE_MP_PASS_THROUGH STREQUAL "STATIC")
14 CHECK_APPEND_DEFINE(EINA_STATIC_BUILD_PASS_THROUGH 1)
15else()
16 CHECK_APPEND_DEFINE(EINA_STATIC_BUILD_PASS_THROUGH "")
17endif()
18
19# generate the file and close the scope started with CHECK_INIT(eina):
20EFL_HEADER_CHECKS_FINALIZE(${CMAKE_CURRENT_BINARY_DIR}/src/lib/eina/eina_config_gen.h)
21
22# TODO: when autotools is gone, rename this file in repository
23# and remove this copy (using generate to skip @-subst)
24file(GENERATE
25 OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/src/lib/eina/eina_config.h
26 INPUT ${CMAKE_CURRENT_SOURCE_DIR}/src/lib/eina/eina_config.h.cmake
27)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
deleted file mode 100644
index 3125acd..0000000
--- a/src/CMakeLists.txt
+++ /dev/null
@@ -1,2 +0,0 @@
1include(CMakeLists_Eina.txt)
2add_subdirectory(lib/efl/) \ No newline at end of file
diff --git a/src/CMakeLists_Eina.txt b/src/CMakeLists_Eina.txt
deleted file mode 100644
index f763d67..0000000
--- a/src/CMakeLists_Eina.txt
+++ /dev/null
@@ -1,11 +0,0 @@
1INCLUDE (FindPkgConfig)
2
3set(EINA_STATIC_BUILD_CHAINED_POOL 1)
4set(EINA_STATIC_BUILD_ONE_BIG 1)
5set(EINA_STATIC_BUILD_PASS_THROUGH 1)
6
7pkg_check_modules(VG REQUIRED valgrind)
8
9add_subdirectory(lib/eina)
10add_subdirectory(modules/eina)
11add_subdirectory(tests/eina) \ No newline at end of file
diff --git a/src/bin/ecore_con/CMakeLists.txt b/src/bin/ecore_con/CMakeLists.txt
deleted file mode 100644
index 6309caa..0000000
--- a/src/bin/ecore_con/CMakeLists.txt
+++ /dev/null
@@ -1,10 +0,0 @@
1set(OUTPUT_NAME efl_net_proxy_helper)
2set(EFL_UTILITY ON)
3
4set(LIBRARIES
5 eina
6)
7
8set(SOURCES
9 efl_net_proxy_helper.c
10)
diff --git a/src/bin/eeze/eeze_mount/CMakeLists.txt b/src/bin/eeze/eeze_mount/CMakeLists.txt
deleted file mode 100644
index 5105678..0000000
--- a/src/bin/eeze/eeze_mount/CMakeLists.txt
+++ /dev/null
@@ -1,7 +0,0 @@
1set(LIBRARIES
2 ecore_file
3)
4
5set(SOURCES
6 eeze_mount.c
7)
diff --git a/src/bin/eeze/eeze_scanner/CMakeLists.txt b/src/bin/eeze/eeze_scanner/CMakeLists.txt
deleted file mode 100644
index 4f7ec95..0000000
--- a/src/bin/eeze/eeze_scanner/CMakeLists.txt
+++ /dev/null
@@ -1,10 +0,0 @@
1set(LIBRARIES
2 eeze
3 eet
4 ecore_con
5)
6
7set(SOURCES
8 eeze_scanner.c
9 eeze_scanner.h
10)
diff --git a/src/bin/eeze/eeze_scanner_monitor/CMakeLists.txt b/src/bin/eeze/eeze_scanner_monitor/CMakeLists.txt
deleted file mode 100644
index 2165867..0000000
--- a/src/bin/eeze/eeze_scanner_monitor/CMakeLists.txt
+++ /dev/null
@@ -1,9 +0,0 @@
1set(LIBRARIES
2 eeze
3 eet
4 ecore_con
5)
6
7set(SOURCES
8 eeze_scanner_monitor.c
9)
diff --git a/src/bin/eeze/eeze_sensor_test/CMakeLists.txt b/src/bin/eeze/eeze_sensor_test/CMakeLists.txt
deleted file mode 100644
index bd18f31..0000000
--- a/src/bin/eeze/eeze_sensor_test/CMakeLists.txt
+++ /dev/null
@@ -1,7 +0,0 @@
1set(PKG_CONFIG_REQUIRES_PRIVATE
2 udev
3)
4
5set(SOURCES
6 eeze_sensor_test.c
7)
diff --git a/src/bin/eeze/eeze_umount/CMakeLists.txt b/src/bin/eeze/eeze_umount/CMakeLists.txt
deleted file mode 100644
index 51581a2..0000000
--- a/src/bin/eeze/eeze_umount/CMakeLists.txt
+++ /dev/null
@@ -1,9 +0,0 @@
1set(LIBRARIES
2 eeze
3 eet
4 ecore_file
5)
6
7set(SOURCES
8 eeze_umount.c
9)
diff --git a/src/bin/eldbus/CMakeLists.txt b/src/bin/eldbus/CMakeLists.txt
deleted file mode 100644
index f83a09a..0000000
--- a/src/bin/eldbus/CMakeLists.txt
+++ /dev/null
@@ -1,15 +0,0 @@
1set(OUTPUT_NAME eldbus-codegen)
2
3set(LIBRARIES
4 eina
5 ecore
6)
7
8set(SOURCES
9 client.c
10 codegen.h
11 dbus.c
12 parser.c
13 source_client.c
14 utils.c
15)
diff --git a/src/bin/embryo/CMakeLists.txt b/src/bin/embryo/CMakeLists.txt
deleted file mode 100644
index 8b0ff7e..0000000
--- a/src/bin/embryo/CMakeLists.txt
+++ /dev/null
@@ -1,24 +0,0 @@
1set(OUTPUT_NAME embryo_cc)
2
3set(LIBRARIES
4 eina
5 m
6)
7
8set(SOURCES
9 embryo_cc_amx.h
10 embryo_cc_osdefs.h
11 embryo_cc_prefix.c
12 embryo_cc_prefix.h
13 embryo_cc_sc.h
14 embryo_cc_sc1.c
15 embryo_cc_sc2.c
16 embryo_cc_sc3.c
17 embryo_cc_sc4.c
18 embryo_cc_sc5.c
19 embryo_cc_sc6.c
20 embryo_cc_sc7.c
21 embryo_cc_scexpand.c
22 embryo_cc_sclist.c
23 embryo_cc_scvars.c
24)
diff --git a/src/bin/eolian/CMakeLists.txt b/src/bin/eolian/CMakeLists.txt
deleted file mode 100644
index 05278d7..0000000
--- a/src/bin/eolian/CMakeLists.txt
+++ /dev/null
@@ -1,19 +0,0 @@
1set(OUTPUT_NAME eolian_gen)
2
3set(LIBRARIES
4 eina
5 eolian
6)
7
8set(SOURCES
9 docs.c
10 docs.h
11 headers.c
12 headers.h
13 main.c
14 main.h
15 sources.c
16 sources.h
17 types.c
18 types.h
19) \ No newline at end of file
diff --git a/src/lib/CMakeLists.txt b/src/lib/CMakeLists.txt
deleted file mode 100644
index 288b6c7..0000000
--- a/src/lib/CMakeLists.txt
+++ /dev/null
@@ -1 +0,0 @@
1add_subdirectory(eina) \ No newline at end of file
diff --git a/src/lib/ecore/CMakeLists.txt b/src/lib/ecore/CMakeLists.txt
deleted file mode 100644
index 2cf4efb..0000000
--- a/src/lib/ecore/CMakeLists.txt
+++ /dev/null
@@ -1,104 +0,0 @@
1set(DESCRIPTION "Ecore event abstraction library")
2
3set(PUBLIC_LIBRARIES
4 efl
5 eina
6 eo
7)
8
9set(LIBRARIES
10 m
11)
12
13if(ENABLE_SYSTEMD)
14 list(APPEND PKG_CONFIG_REQUIRES_PRIVATE libsystemd)
15endif()
16
17if(ENABLE_GLIB)
18 list(APPEND PKG_CONFIG_REQUIRES_PRIVATE glib-2.0 gthread-2.0)
19endif()
20
21set(PUBLIC_EO_FILES
22 ecore_exe.eo
23 ecore_poller.eo
24 ecore_types.eot
25 efl_io_buffered_stream.eo
26 efl_io_closer_fd.eo
27 efl_io_copier.eo
28 efl_io_file.eo
29 efl_io_positioner_fd.eo
30 efl_io_reader_fd.eo
31 efl_io_sizer_fd.eo
32 efl_io_stderr.eo
33 efl_io_stdin.eo
34 efl_io_stdout.eo
35 efl_io_writer_fd.eo
36 efl_loop.eo
37 efl_loop_fd.eo
38 efl_loop_timer.eo
39 efl_loop_user.eo
40 efl_promise.eo
41 efl_linear_interpolator.eo
42 efl_accelerate_interpolator.eo
43 efl_decelerate_interpolator.eo
44 efl_sinusoidal_interpolator.eo
45 efl_divisor_interpolator.eo
46 efl_bounce_interpolator.eo
47 efl_spring_interpolator.eo
48 efl_cubic_bezier_interpolator.eo
49)
50
51set(PUBLIC_HEADERS
52 Ecore.h
53 Ecore_Common.h
54 Ecore_Eo.h
55 Ecore_Getopt.h
56 Ecore_Legacy.h
57)
58
59set(SOURCES
60 ecore.c
61 ecore_alloc.c
62 ecore_anim.c
63 ecore_app.c
64 ecore_events.c
65 ecore_exe.c
66 ecore_exe_private.h
67 ecore_getopt.c
68 ecore_glib.c
69 ecore_idle_enterer.c
70 ecore_idle_exiter.c
71 ecore_idler.c
72 ecore_internal.h
73 ecore_job.c
74 ecore_main.c
75 ecore_pipe.c
76 ecore_poller.c
77 ecore_private.h
78 ecore_thread.c
79 ecore_throttle.c
80 ecore_time.c
81 ecore_timer.c
82 efl_io_buffered_stream.c
83 efl_io_closer_fd.c
84 efl_io_copier.c
85 efl_io_file.c
86 efl_io_positioner_fd.c
87 efl_io_reader_fd.c
88 efl_io_sizer_fd.c
89 efl_io_stderr.c
90 efl_io_stdin.c
91 efl_io_stdout.c
92 efl_io_writer_fd.c
93 efl_loop_fd.c
94 efl_loop_user.c
95 efl_promise.c
96)
97
98# TODO: win32
99# TODO: ps3
100
101list(APPEND SOURCES
102 ecore_exe_posix.c
103 ecore_signal.c
104)
diff --git a/src/lib/ecore_con/CMakeLists.txt b/src/lib/ecore_con/CMakeLists.txt
deleted file mode 100644
index 87e152b..0000000
--- a/src/lib/ecore_con/CMakeLists.txt
+++ /dev/null
@@ -1,133 +0,0 @@
1set(DESCRIPTION "E core library, Con module")
2
3set(LIBRARIES
4 ecore
5 eet
6 efl
7 eina
8 emile
9 eo
10 m
11)
12
13set(PUBLIC_EO_FILES
14 ecore_con_eet_base.eo
15 ecore_con_eet_client_obj.eo
16 ecore_con_eet_server_obj.eo
17 efl_net_control.eo
18 efl_net_control_access_point.eo
19 efl_net_control_technology.eo
20 efl_net_dialer.eo
21 efl_net_dialer_http.eo
22 efl_net_dialer_simple.eo
23 efl_net_dialer_ssl.eo
24 efl_net_dialer_tcp.eo
25 efl_net_dialer_udp.eo
26 efl_net_dialer_websocket.eo
27 efl_net_http_types.eot
28 efl_net_ip_address.eo
29 efl_net_server.eo
30 efl_net_server_fd.eo
31 efl_net_server_simple.eo
32 efl_net_server_ssl.eo
33 efl_net_server_tcp.eo
34 efl_net_server_udp.eo
35 efl_net_server_udp_client.eo
36 efl_net_session.eo
37 efl_net_socket.eo
38 efl_net_socket_fd.eo
39 efl_net_socket_simple.eo
40 efl_net_socket_ssl.eo
41 efl_net_socket_tcp.eo
42 efl_net_socket_udp.eo
43 efl_net_ssl_context.eo
44 efl_net_ssl_types.eot
45 efl_net_types.eot
46)
47
48set(PUBLIC_HEADERS
49 Ecore_Con.h
50 Ecore_Con_Eet.h
51 Ecore_Con_Eet_Eo.h
52 Ecore_Con_Eet_Legacy.h
53 Ecore_Con_Eo.h
54)
55
56set(SOURCES
57 ecore_con.c
58 ecore_con_alloc.c
59 ecore_con_eet.c
60 ecore_con_legacy.c
61 ecore_con_local.c
62 ecore_con_private.h
63 ecore_con_proxy_helper.c
64 ecore_con_socks.c
65 ecore_con_url.c
66 ecore_con_url_curl.c
67 ecore_con_url_curl.h
68 efl_net_dialer.c
69 efl_net_dialer_http.c
70 efl_net_dialer_simple.c
71 efl_net_dialer_ssl.c
72 efl_net_dialer_tcp.c
73 efl_net_dialer_udp.c
74 efl_net_dialer_websocket.c
75 efl_net_ip_address.c
76 efl_net_server.c
77 efl_net_server_fd.c
78 efl_net_server_simple.c
79 efl_net_server_ssl.c
80 efl_net_server_tcp.c
81 efl_net_server_udp.c
82 efl_net_server_udp_client.c
83 efl_net_socket.c
84 efl_net_socket_fd.c
85 efl_net_socket_simple.c
86 efl_net_socket_ssl.c
87 efl_net_socket_tcp.c
88 efl_net_socket_udp.c
89 efl_net_ssl_context.c
90)
91
92if(HAVE_SYS_UN_H)
93 list(APPEND PUBLIC_EO_FILES
94 efl_net_dialer_unix.eo
95 efl_net_server_unix.eo
96 efl_net_socket_unix.eo
97 )
98
99 list(APPEND SOURCES
100 efl_net_dialer_unix.c
101 efl_net_server_unix.c
102 efl_net_socket_unix.c
103 )
104endif()
105
106if(WITH_CRYPTO STREQUAL "gnutls")
107 list(APPEND PKG_CONFIG_REQUIRES_PRIVATE gnutls)
108elseif(WITH_CRYPTO STREQUAL "openssl")
109 list(APPEND PKG_CONFIG_REQUIRES_PRIVATE openssl)
110endif()
111
112if(ENABLE_SYSTEMD)
113 list(APPEND PKG_CONFIG_REQUIRES_PRIVATE libsystemd)
114endif()
115
116if(WITH_EFL_NET_CONTROL_BACKEND STREQUAL "connman")
117 list(APPEND SOURCES
118 efl_net-connman.c
119 efl_net-connman.h
120 efl_net_control-connman.c
121 efl_net_control_access_point-connman.c
122 efl_net_control_technology-connman.c
123 efl_net_session-connman.c
124 )
125 list(APPEND LIBRARIES eldbus)
126else()
127 list(APPEND SOURCES
128 efl_net_control-none.c
129 efl_net_control_access_point-none.c
130 efl_net_control_technology-none.c
131 efl_net_session-none.c
132 )
133endif()
diff --git a/src/lib/ecore_file/CMakeLists.txt b/src/lib/ecore_file/CMakeLists.txt
deleted file mode 100644
index fbee450..0000000
--- a/src/lib/ecore_file/CMakeLists.txt
+++ /dev/null
@@ -1,29 +0,0 @@
1set(DESCRIPTION "E core library, File module")
2
3set(LIBRARIES
4 ecore
5 ecore_con
6 efl
7 eina
8 eo
9)
10
11set(PUBLIC_HEADERS
12 Ecore_File.h
13)
14
15set(SOURCES
16 ecore_file.c
17 ecore_file_download.c
18 ecore_file_monitor.c
19 ecore_file_path.c
20 ecore_file_private.h
21)
22
23if(HAVE_SYS_INOTIFY_H)
24 list(APPEND SOURCES ecore_file_monitor_inotify.c)
25elseif(WINDOWS)
26 list(APPEND SOURCES ecore_file_monitor_win32.c)
27else()
28 list(APPEND SOURCES ecore_file_monitor_poll.c)
29endif()
diff --git a/src/lib/ecore_input/CMakeLists.txt b/src/lib/ecore_input/CMakeLists.txt
deleted file mode 100644
index c9f20c7..0000000
--- a/src/lib/ecore_input/CMakeLists.txt
+++ /dev/null
@@ -1,22 +0,0 @@
1set(PUBLIC_LIBRARIES
2 eina
3 eo
4)
5
6set(LIBRARIES
7 ecore
8 efl
9 eeze
10)
11
12set(PUBLIC_HEADERS
13 Ecore_Input.h
14)
15
16set(SOURCES
17 ecore_input.c
18 ecore_input_compose.c
19 ecore_input_compose.h
20 ecore_input_joystick.c
21 ecore_input_private.h
22)
diff --git a/src/lib/ecore_ipc/CMakeLists.txt b/src/lib/ecore_ipc/CMakeLists.txt
deleted file mode 100644
index 4eec098..0000000
--- a/src/lib/ecore_ipc/CMakeLists.txt
+++ /dev/null
@@ -1,19 +0,0 @@
1set(DESCRIPTION "E core library, IPC module")
2
3set(LIBRARIES
4 ecore
5 ecore_con
6 efl
7 eina
8 eo
9)
10
11set(PUBLIC_HEADERS
12 Ecore_Ipc.h
13)
14
15set(SOURCES
16 ecore_ipc.c
17 ecore_ipc_private.h
18)
19
diff --git a/src/lib/ecore_x/CMakeLists.txt b/src/lib/ecore_x/CMakeLists.txt
deleted file mode 100644
index fec2eae..0000000
--- a/src/lib/ecore_x/CMakeLists.txt
+++ /dev/null
@@ -1,61 +0,0 @@
1set(PUBLIC_LIBRARIES
2 eina
3 ecore
4)
5
6set(LIBRARIES
7 ecore
8 ecore_input
9 efl
10 eo
11 ${X_EXTENSIONS}
12)
13
14message("${LIBRARIES}")
15
16#todo XRANDR_GOOD
17
18set(PUBLIC_HEADERS
19 Ecore_X.h
20 # ecore_x_version.h
21 Ecore_X_Atoms.h
22 Ecore_X_Cursor.h
23)
24
25set(SOURCES
26 ecore_x_atoms_decl.h
27 ecore_x.c
28 ecore_x_dnd.c
29 ecore_x_sync.c
30 ecore_x_randr.c
31 ecore_x_fixes.c
32 ecore_x_damage.c
33 ecore_x_composite.c
34 ecore_x_error.c
35 ecore_x_events.c
36 ecore_x_icccm.c
37 ecore_x_keygrab.c
38 ecore_x_netwm.c
39 ecore_x_mwm.c
40 ecore_x_e.c
41 ecore_x_selection.c
42 ecore_x_window.c
43 ecore_x_window_prop.c
44 ecore_x_window_shape.c
45 ecore_x_pixmap.c
46 ecore_x_present.c
47 ecore_x_gc.c
48 ecore_x_xinerama.c
49 ecore_x_screensaver.c
50 ecore_x_dpms.c
51 ecore_x_drawable.c
52 ecore_x_cursor.c
53 ecore_x_test.c
54 ecore_x_atoms.c
55 ecore_x_region.c
56 ecore_x_image.c
57 ecore_x_xi2.c
58 ecore_x_vsync.c
59 ecore_x_gesture.c
60 ecore_x_private.h
61)
diff --git a/src/lib/ector/CMakeLists.txt b/src/lib/ector/CMakeLists.txt
deleted file mode 100644
index fa62634..0000000
--- a/src/lib/ector/CMakeLists.txt
+++ /dev/null
@@ -1,119 +0,0 @@
1set(DESCRIPTION "Enlightened retained mode drawing library")
2
3set(LIBRARIES
4 eet
5 efl
6 emile
7 m
8 support-draw
9 support-freetype
10 support-rg_etc
11 support-triangulator
12)
13
14set(PUBLIC_LIBRARIES
15 eina
16 eo
17)
18
19set(PUBLIC_EO_FILES
20 ector_buffer.eo
21 ector_renderer.eo
22 ector_renderer_buffer.eo
23 ector_renderer_gradient.eo
24 ector_renderer_gradient_linear.eo
25 ector_renderer_gradient_radial.eo
26 ector_renderer_shape.eo
27 ector_surface.eo
28 ector_types.eot
29
30 cairo/ector_cairo_software_surface.eo
31 cairo/ector_cairo_surface.eo
32 cairo/ector_renderer_cairo.eo
33 cairo/ector_renderer_cairo_gradient_linear.eo
34 cairo/ector_renderer_cairo_gradient_radial.eo
35 cairo/ector_renderer_cairo_shape.eo
36
37 gl/ector_gl_buffer.eo
38 gl/ector_gl_buffer_base.eo
39 gl/ector_gl_surface.eo
40 gl/ector_renderer_gl.eo
41 gl/ector_renderer_gl_gradient_linear.eo
42 gl/ector_renderer_gl_gradient_radial.eo
43 gl/ector_renderer_gl_shape.eo
44
45 software/ector_renderer_software.eo
46 software/ector_renderer_software_buffer.eo
47 software/ector_renderer_software_gradient_linear.eo
48 software/ector_renderer_software_gradient_radial.eo
49 software/ector_renderer_software_shape.eo
50 software/ector_software_buffer.eo
51 software/ector_software_buffer_base.eo
52 software/ector_software_surface.eo
53)
54
55set(PUBLIC_HEADERS
56 Ector.h
57 ector_buffer.h
58 ector_renderer.h
59 ector_surface.h
60 ector_util.h
61
62 cairo/Ector_Cairo.h
63
64 gl/Ector_GL.h
65
66 software/Ector_Software.h
67)
68
69set(SOURCES
70 ector_buffer.c
71 ector_gl_internal.h
72 ector_main.c
73 ector_renderer.c
74 ector_renderer_buffer.c
75 ector_renderer_gradient.c
76 ector_renderer_gradient_linear.c
77 ector_renderer_gradient_radial.c
78 ector_renderer_shape.c
79
80 cairo/ector_cairo_software_surface.c
81 cairo/ector_cairo_surface.c
82 cairo/ector_renderer_cairo.c
83 cairo/ector_renderer_cairo_gradient_linear.c
84 cairo/ector_renderer_cairo_gradient_radial.c
85 cairo/ector_renderer_cairo_shape.c
86
87 gl/ector_gl_buffer.c
88 gl/ector_gl_buffer_base.c
89 gl/ector_gl_private.h
90 gl/ector_gl_shader.c
91 gl/ector_gl_surface.c
92 gl/ector_renderer_gl.c
93 gl/ector_renderer_gl_gradient_linear.c
94 gl/ector_renderer_gl_gradient_radial.c
95 gl/ector_renderer_gl_shape.c
96 gl/shader/ector_gl_shaders.x
97
98 software/ector_renderer_software_buffer.c
99 software/ector_renderer_software_gradient_linear.c
100 software/ector_renderer_software_gradient_radial.c
101 software/ector_renderer_software_shape.c
102 software/ector_software_buffer.c
103 software/ector_software_gradient.c
104 software/ector_software_rasterizer.c
105 software/ector_software_surface.c
106)
107
108add_custom_target(ector-update-shaders
109 COMMAND /bin/sh ${EFL_LIB_SOURCE_DIR}/gl/shader/gen_shaders.sh
110 DEPENDS
111 ${EFL_LIB_SOURCE_DIR}/gl/shader/gen_shaders.sh
112 ${EFL_LIB_SOURCE_DIR}/gl/shader/fragment.glsl
113 ${EFL_LIB_SOURCE_DIR}/gl/shader/vertex.glsl
114 ${EFL_LIB_SOURCE_DIR}/gl/shader/include.glsl
115 WORKING_DIRECTORY "${EFL_LIB_SOURCE_DIR}"
116 COMMENT "SHADERS src/lib/ector/gl/shader/ector_gl_shaders.x (if needed)"
117)
118
119set(DEPENDENCIES ector-update-shaders)
diff --git a/src/lib/eet/CMakeLists.txt b/src/lib/eet/CMakeLists.txt
deleted file mode 100644
index fb2c02d..0000000
--- a/src/lib/eet/CMakeLists.txt
+++ /dev/null
@@ -1,39 +0,0 @@
1set(DESCRIPTION "Library for speedy data storage, retrieval, and compression")
2
3set(PKG_CONFIG_REQUIRES_PRIVATE
4 zlib>=1.2.3
5)
6
7set(PUBLIC_LIBRARIES
8 eina
9 emile
10)
11
12set(LIBRARIES
13 m
14 support-rg_etc
15 find-JPEG
16)
17
18set(PUBLIC_HEADERS
19 Eet.h
20)
21
22set(SOURCES
23 eet_alloc.c
24 eet_cipher.c
25 eet_connection.c
26 eet_data.c
27 eet_dictionary.c
28 eet_image.c
29 eet_lib.c
30 eet_node.c
31 Eet_private.h
32 eet_utils.c
33)
34
35if(WITH_CRYPTO STREQUAL "gnutls")
36 list(APPEND PKG_CONFIG_REQUIRES_PRIVATE gnutls)
37elseif(WITH_CRYPTO STREQUAL "openssl")
38 list(APPEND PKG_CONFIG_REQUIRES_PRIVATE openssl)
39endif()
diff --git a/src/lib/eeze/CMakeLists.txt b/src/lib/eeze/CMakeLists.txt
deleted file mode 100644
index c9aa9e0..0000000
--- a/src/lib/eeze/CMakeLists.txt
+++ /dev/null
@@ -1,67 +0,0 @@
1set(DESCRIPTION "Ecore event abstraction library")
2
3set(PUBLIC_LIBRARIES
4 eina
5 ecore
6)
7
8set(LIBRARIES
9 eo
10 efl
11 ecore_con
12 ecore_file
13 eet
14 emile
15)
16
17set(PKG_CONFIG_REQUIRES_PRIVATE
18 libudev
19)
20
21
22if (${HAVE_EEZE_MOUNT})
23 list(APPEND PKG_CONFIG_REQUIRES_PRIVATE mount)
24endif()
25
26if (${ENABLE_TIZEN})
27 list(APPEND PKG_CONFIG_REQUIRES_PRIVATE capi-system-sensor)
28endif()
29
30
31set(PUBLIC_HEADERS
32 Eeze.h
33 Eeze_Disk.h
34 Eeze_Net.h
35 Eeze_Sensor.h
36)
37
38set(SOURCES
39 eeze_disk.c
40 eeze_disk_mount.c
41 eeze_disk_private.h
42 eeze_disk_udev.c
43 eeze_main.c
44 eeze_net.c
45 eeze_net_private.h
46 eeze_sensor.c
47 eeze_sensor_private.h
48 eeze_udev_find.c
49 eeze_udev_private.c
50 eeze_udev_private.h
51 eeze_udev_syspath.c
52 eeze_udev_walk.c
53 eeze_udev_watch.c
54)
55
56#mount files
57if(${HAVE_EEZE_MOUNT})
58 if (${MOUNT_VERSION} LESS 2.19.0)
59 list(APPEND SOURCES eeze_disk_libmount_old.c)
60 elseif (${MOUNT_VERSION} GREATER 2.19.0)
61 list(APPEND SOURCES eeze_disk_libmount_new.c)
62 else()
63 list(APPEND SOURCES eeze_disk_libmount.c)
64 endif()
65else()
66 list(APPEND SOURCES eeze_disk_dummy.c)
67endif()
diff --git a/src/lib/efl/CMakeLists.txt b/src/lib/efl/CMakeLists.txt
deleted file mode 100644
index 7f16729..0000000
--- a/src/lib/efl/CMakeLists.txt
+++ /dev/null
@@ -1,93 +0,0 @@
1set(DESCRIPTION "EFL's general purpose library")
2
3set(LIBRARIES eo eina)
4
5set(PUBLIC_EO_FILES
6 interfaces/efl_animator.eo
7 interfaces/efl_canvas.eo
8 interfaces/efl_canvas_pointer.eo
9 interfaces/efl_config.eo
10 interfaces/efl_container.eo
11 interfaces/efl_content.eo
12 interfaces/efl_control.eo
13 interfaces/efl_file.eo
14 interfaces/efl_gfx.eo
15 interfaces/efl_gfx_buffer.eo
16 interfaces/efl_gfx_fill.eo
17 interfaces/efl_gfx_filter.eo
18 interfaces/efl_gfx_gradient.eo
19 interfaces/efl_gfx_gradient_linear.eo
20 interfaces/efl_gfx_gradient_radial.eo
21 interfaces/efl_gfx_path.eo
22 interfaces/efl_gfx_shape.eo
23 interfaces/efl_gfx_size_hint.eo
24 interfaces/efl_gfx_stack.eo
25 interfaces/efl_gfx_types.eot
26 interfaces/efl_gfx_view.eo
27 interfaces/efl_image.eo
28 interfaces/efl_image_animated.eo
29 interfaces/efl_image_load.eo
30 interfaces/efl_input_device.eo
31 interfaces/efl_input_types.eot
32 interfaces/efl_interpolator.eo
33 interfaces/efl_io_buffer.eo
34 interfaces/efl_io_closer.eo
35 interfaces/efl_io_positioner.eo
36 interfaces/efl_io_queue.eo
37 interfaces/efl_io_reader.eo
38 interfaces/efl_io_sizer.eo
39 interfaces/efl_io_writer.eo
40 interfaces/efl_model.eo
41 interfaces/efl_observable.eo
42 interfaces/efl_observer.eo
43 interfaces/efl_orientation.eo
44 interfaces/efl_pack.eo
45 interfaces/efl_pack_table.eo
46 interfaces/efl_pack_layout.eo
47 interfaces/efl_pack_linear.eo
48 interfaces/efl_part.eo
49 interfaces/efl_player.eo
50 interfaces/efl_screen.eo
51 interfaces/efl_text.eo
52 interfaces/efl_text_types.eot
53 interfaces/efl_types.eot
54 interfaces/efl_ui_range.eo
55 interfaces/efl_ui_autorepeat.eo
56 interfaces/efl_vpath.eo
57 interfaces/efl_vpath_core.eo
58 interfaces/efl_vpath_file.eo
59 interfaces/efl_vpath_file_core.eo
60 interfaces/efl_vpath_manager.eo
61)
62
63set(PUBLIC_HEADERS
64 Efl.h
65 Efl_Config.h
66 Efl_Model_Common.h
67 interfaces/efl_common_internal.h
68)
69
70set(SOURCES
71 interfaces/efl_interfaces_main.c
72 interfaces/efl_model_common.c
73 interfaces/efl_gfx_path.c
74 interfaces/efl_gfx_shape.c
75 interfaces/efl_vpath_file.c
76 interfaces/efl_vpath_manager.c
77 interfaces/efl_vpath_core.c
78 interfaces/efl_vpath_file_core.c
79 interfaces/efl_input_device.c
80 interfaces/efl_io_closer.c
81 interfaces/efl_io_positioner.c
82 interfaces/efl_io_reader.c
83 interfaces/efl_io_sizer.c
84 interfaces/efl_io_writer.c
85 interfaces/efl_io_buffer.c
86 interfaces/efl_io_queue.c
87 interfaces/efl_observer.c
88)
89
90set(DEFINITIONS -DEFL_GFX_FILTER_BETA)
91
92# XXX HACK: interfaces/efl_canvas.eo refers to Efl.Input.Focus!
93set(EOLIAN_EXTRA_PARAMS -I${CMAKE_SOURCE_DIR}/src/lib/evas/canvas)
diff --git a/src/lib/eina/CMakeLists.txt b/src/lib/eina/CMakeLists.txt
deleted file mode 100644
index 4c5ee50..0000000
--- a/src/lib/eina/CMakeLists.txt
+++ /dev/null
@@ -1,176 +0,0 @@
1set(DESCRIPTION "A Library that implements fast data types and miscellaneous tools")
2
3if(ENABLE_SYSTEMD)
4 list(APPEND PKG_CONFIG_REQUIRES_PRIVATE libsystemd)
5endif()
6
7if(ENABLE_VALGRIND)
8 list(APPEND PKG_CONFIG_REQUIRES_PRIVATE valgrind)
9endif()
10
11if(UNWIND_FOUND)
12 list(APPEND PKG_CONFIG_REQUIRES_PRIVATE libunwind libunwind-generic)
13endif()
14
15set(PUBLIC_LIBRARIES
16 pthread
17)
18
19set(LIBRARIES
20 m
21 dl
22 rt
23)
24
25if(HAVE_BSD_STRING_H)
26 list(APPEND LIBRARIES bsd)
27endif()
28
29set(PUBLIC_HEADERS
30 Eina.h
31 eina_accessor.h
32 eina_alloca.h
33 eina_array.h
34 eina_benchmark.h
35 eina_bezier.h
36 eina_binbuf.h
37 eina_binshare.h
38 eina_clist.h
39 eina_config.h
40 eina_config_gen.h
41 eina_convert.h
42 eina_counter.h
43 eina_cow.h
44 eina_cpu.h
45 eina_crc.h
46 eina_debug.h
47 eina_error.h
48 eina_evlog.h
49 eina_file.h
50 eina_file_common.h
51 eina_fp.h
52 eina_freeq.h
53 eina_hamster.h
54 eina_hash.h
55 eina_inarray.h
56 eina_inline_private.h
57 eina_inlist.h
58 eina_iterator.h
59 eina_lalloc.h
60 eina_list.h
61 eina_lock.h
62 eina_log.h
63 eina_magic.h
64 eina_main.h
65 eina_matrix.h
66 eina_matrixsparse.h
67 eina_mempool.h
68 eina_mmap.h
69 eina_module.h
70 eina_prefix.h
71 eina_private.h
72 eina_quad.h
73 eina_quadtree.h
74 eina_quaternion.h
75 eina_rbtree.h
76 eina_rectangle.h
77 eina_refcount.h
78 eina_safepointer.h
79 eina_safety_checks.h
80 eina_sched.h
81 eina_share_common.h
82 eina_simple_xml_parser.h
83 eina_slice.h
84 eina_slstr.h
85 eina_str.h
86 eina_strbuf.h
87 eina_strbuf_common.h
88 eina_strbuf_template_c.x
89 eina_stringshare.h
90 eina_thread.h
91 eina_thread_queue.h
92 eina_tiler.h
93 eina_tmpstr.h
94 eina_trash.h
95 eina_types.h
96 eina_unicode.h
97 eina_ustrbuf.h
98 eina_ustringshare.h
99 eina_util.h
100 eina_value.h
101 eina_value_util.h
102 eina_vector.h
103 eina_xattr.h
104 )
105
106set(SOURCES
107 eina_abi.c
108 eina_accessor.c
109 eina_array.c
110 eina_benchmark.c
111 eina_bezier.c
112 eina_binbuf.c
113 eina_binshare.c
114 eina_convert.c
115 eina_counter.c
116 eina_cow.c
117 eina_cpu.c
118 eina_crc.c
119 eina_debug.c
120 eina_debug_bt.c
121 eina_debug_bt_file.c
122 eina_debug_chunk.c
123 eina_debug_monitor.c
124 eina_debug_proto.c
125 eina_debug_thread.c
126 eina_error.c
127 eina_evlog.c
128 eina_file.c
129 eina_file_common.c
130 eina_fp.c
131 eina_freeq.c
132 eina_hamster.c
133 eina_hash.c
134 eina_inarray.c
135 eina_inlist.c
136 eina_iterator.c
137 eina_lalloc.c
138 eina_list.c
139 eina_lock.c
140 eina_log.c
141 eina_magic.c
142 eina_main.c
143 eina_matrix.c
144 eina_matrixsparse.c
145 eina_mempool.c
146 eina_mmap.c
147 eina_module.c
148 eina_prefix.c
149 eina_quad.c
150 eina_quadtree.c
151 eina_quaternion.c
152 eina_rbtree.c
153 eina_rectangle.c
154 eina_safepointer.c
155 eina_safety_checks.c
156 eina_sched.c
157 eina_share_common.c
158 eina_simple_xml_parser.c
159 eina_slstr.c
160 eina_str.c
161 eina_strbuf.c
162 eina_strbuf_common.c
163 eina_strbuf_template_c.x
164 eina_stringshare.c
165 eina_thread.c
166 eina_thread_queue.c
167 eina_tiler.c
168 eina_tmpstr.c
169 eina_unicode.c
170 eina_ustrbuf.c
171 eina_ustringshare.c
172 eina_util.c
173 eina_value.c
174 eina_value_util.c
175 eina_xattr.c
176 )
diff --git a/src/lib/eldbus/CMakeLists.txt b/src/lib/eldbus/CMakeLists.txt
deleted file mode 100644
index ecbea4c..0000000
--- a/src/lib/eldbus/CMakeLists.txt
+++ /dev/null
@@ -1,70 +0,0 @@
1set(DESCRIPTION "D-Bus access from Ecore")
2
3set(PKG_CONFIG_REQUIRES_PRIVATE
4 dbus-1
5)
6
7set(LIBRARIES
8 eina
9 eo
10 efl
11 ecore
12)
13
14set(PUBLIC_EO_FILES
15 eldbus_model_arguments.eo
16 eldbus_model_connection.eo
17 eldbus_model_method.eo
18 eldbus_model_object.eo
19 eldbus_model_proxy.eo
20 eldbus_model_signal.eo
21 eldbus_types.eot
22)
23
24set(PUBLIC_HEADERS
25 Eldbus.h
26 eldbus_connection.h
27 eldbus_freedesktop.h
28 eldbus_introspection.h
29 eldbus_message.h
30 eldbus_message_eina_value.h
31 eldbus_message_helper.h
32 Eldbus_Model.h
33 eldbus_object.h
34 eldbus_pending.h
35 eldbus_proxy.h
36 eldbus_service.h
37 eldbus_signal_handler.h
38)
39
40set(SOURCES
41 eldbus_core.c
42 eldbus_freedesktop.c
43 eldbus_introspection.c
44 eldbus_message.c
45 eldbus_message_from_eina_value.c
46 eldbus_message_helper.c
47 eldbus_message_to_eina_value.c
48 eldbus_model_arguments.c
49 eldbus_model_arguments_private.h
50 eldbus_model_connection.c
51 eldbus_model_connection_private.h
52 eldbus_model_method.c
53 eldbus_model_method_private.h
54 eldbus_model_object.c
55 eldbus_model_object_private.h
56 eldbus_model_private.h
57 eldbus_model_proxy.c
58 eldbus_model_proxy_private.h
59 eldbus_model_signal.c
60 eldbus_model_signal_private.h
61 eldbus_object.c
62 eldbus_pending.c
63 eldbus_private.h
64 eldbus_private_types.h
65 eldbus_proxy.c
66 eldbus_service.c
67 eldbus_signal_handler.c
68)
69
70set(COMPILE_FLAGS "-include ${CMAKE_BINARY_DIR}/src/lib/efl/config.h")
diff --git a/src/lib/embryo/CMakeLists.txt b/src/lib/embryo/CMakeLists.txt
deleted file mode 100644
index dc8328b..0000000
--- a/src/lib/embryo/CMakeLists.txt
+++ /dev/null
@@ -1,21 +0,0 @@
1set(DESCRIPTION "A small virtual machine engine and bytecode compiler")
2
3set(LIBRARIES
4 eina
5 m
6)
7
8set(PUBLIC_HEADERS
9 Embryo.h
10)
11
12set(SOURCES
13 embryo_amx.c
14 embryo_args.c
15 embryo_float.c
16 embryo_main.c
17 embryo_private.h
18 embryo_rand.c
19 embryo_str.c
20 embryo_time.c
21)
diff --git a/src/lib/emile/CMakeLists.txt b/src/lib/emile/CMakeLists.txt
deleted file mode 100644
index 5ea77fd..0000000
--- a/src/lib/emile/CMakeLists.txt
+++ /dev/null
@@ -1,45 +0,0 @@
1set(DESCRIPTION "Library for simplified serialization, compression and ciphering")
2
3set(PKG_CONFIG_REQUIRES_PRIVATE
4 zlib>=1.2.3
5)
6
7set(LIBRARIES
8 eina
9 efl
10 m
11 support-rg_etc
12 find-JPEG
13)
14
15set(PUBLIC_HEADERS
16 Emile.h
17 emile_base64.h
18 emile_cipher.h
19 emile_compress.h
20 emile_image.h
21)
22
23set(SOURCES
24 emile_base64.c
25 emile_compress.c
26 emile_image.c
27 emile_main.c
28 emile_private.h
29)
30
31if(WITH_CRYPTO STREQUAL "gnutls")
32 list(APPEND SOURCES emile_cipher_gnutls.c)
33 list(APPEND PKG_CONFIG_REQUIRES_PRIVATE gnutls)
34elseif(WITH_CRYPTO STREQUAL "openssl")
35 list(APPEND SOURCES emile_cipher_openssl.c)
36 list(APPEND PKG_CONFIG_REQUIRES_PRIVATE openssl)
37else()
38 list(APPEND SOURCES emile_cipher.c)
39endif()
40
41if(WITH_LZ4 STREQUAL "system")
42 list(APPEND PKG_CONFIG_REQUIRES_PRIVATE liblz4)
43else()
44 list(APPEND LIBRARIES support-lz4)
45endif()
diff --git a/src/lib/eo/CMakeLists.txt b/src/lib/eo/CMakeLists.txt
deleted file mode 100644
index 1946183..0000000
--- a/src/lib/eo/CMakeLists.txt
+++ /dev/null
@@ -1,29 +0,0 @@
1set(DESCRIPTION "EFL's generic object system library.")
2
3set(PUBLIC_LIBRARIES
4 eina
5)
6
7set(PUBLIC_HEADERS
8 Eo.h
9 efl_future.h
10)
11
12set(PUBLIC_EO_FILES
13 efl_object.eo
14 efl_class.eo
15 efl_object_override.eo
16 efl_interface.eo
17)
18
19set(SOURCES
20 eo.c
21 eo_ptr_indirection.c
22 eo_ptr_indirection.h
23 eo_base_class.c
24 eo_class_class.c
25 eo_add_fallback.c
26 eo_add_fallback.h
27 eo_private.h
28 efl_future.c
29)
diff --git a/src/lib/eolian/CMakeLists.txt b/src/lib/eolian/CMakeLists.txt
deleted file mode 100644
index 0225831..0000000
--- a/src/lib/eolian/CMakeLists.txt
+++ /dev/null
@@ -1,46 +0,0 @@
1set(DESCRIPTION "A library to parse .eo files ")
2
3set(LIBRARIES
4 eina
5)
6
7#if (WINDOWS)
8# set(LIBRARIES ${LIBRARIES} evil)
9#endif (WINDOWS)
10
11set(PUBLIC_HEADERS
12 Eolian.h
13)
14
15set(INCLUDE_DIRECTORIES
16 ./
17)
18
19set(SOURCES
20 database_class.c
21 database_class_api.c
22 database_constructor.c
23 database_constructor_api.c
24 database_event.c
25 database_event_api.c
26 database_expr.c
27 database_expr_api.c
28 database_function.c
29 database_function_api.c
30 database_function_parameter.c
31 database_function_parameter_api.c
32 database_implement.c
33 database_implement_api.c
34 database_type.c
35 database_type_api.c
36 database_validate.c
37 database_var.c
38 database_var_api.c
39 eo_lexer.c
40 eo_lexer.h
41 eo_parser.c
42 eo_parser.h
43 eolian.c
44 eolian_database.c
45 eolian_database.h
46)
diff --git a/src/modules/ecore/system/systemd/CMakeLists.txt b/src/modules/ecore/system/systemd/CMakeLists.txt
deleted file mode 100644
index cfae76f..0000000
--- a/src/modules/ecore/system/systemd/CMakeLists.txt
+++ /dev/null
@@ -1,7 +0,0 @@
1set(LIBRARIES
2 eldbus
3)
4
5set(SOURCES
6 ecore_system_systemd.c
7)
diff --git a/src/modules/ecore/system/tizen/CMakeLists.txt b/src/modules/ecore/system/tizen/CMakeLists.txt
deleted file mode 100644
index e185f39..0000000
--- a/src/modules/ecore/system/tizen/CMakeLists.txt
+++ /dev/null
@@ -1,3 +0,0 @@
1set(PKG_CONFIG_REQUIRES_PRIVATE vconf)
2
3set(SOURCES ecore_system_tizen.c)
diff --git a/src/modules/ecore/system/upower/CMakeLists.txt b/src/modules/ecore/system/upower/CMakeLists.txt
deleted file mode 100644
index 6860d9b..0000000
--- a/src/modules/ecore/system/upower/CMakeLists.txt
+++ /dev/null
@@ -1,7 +0,0 @@
1set(LIBRARIES
2 eldbus
3)
4
5set(SOURCES
6 ecore_system_upower.c
7)
diff --git a/src/modules/eina/mp/chained_pool/CMakeLists.txt b/src/modules/eina/mp/chained_pool/CMakeLists.txt
deleted file mode 100644
index fd564b7..0000000
--- a/src/modules/eina/mp/chained_pool/CMakeLists.txt
+++ /dev/null
@@ -1,5 +0,0 @@
1if(ENABLE_VALGRIND)
2 list(APPEND PKG_CONFIG_REQUIRES_PRIVATE valgrind)
3endif()
4
5set(SOURCES eina_chained_mempool.c)
diff --git a/src/modules/eina/mp/one_big/CMakeLists.txt b/src/modules/eina/mp/one_big/CMakeLists.txt
deleted file mode 100644
index 49e758f..0000000
--- a/src/modules/eina/mp/one_big/CMakeLists.txt
+++ /dev/null
@@ -1,5 +0,0 @@
1if(ENABLE_VALGRIND)
2 list(APPEND PKG_CONFIG_REQUIRES_PRIVATE valgrind)
3endif()
4
5set(SOURCES eina_one_big.c)
diff --git a/src/modules/eina/mp/pass_through/CMakeLists.txt b/src/modules/eina/mp/pass_through/CMakeLists.txt
deleted file mode 100644
index 0ab1349..0000000
--- a/src/modules/eina/mp/pass_through/CMakeLists.txt
+++ /dev/null
@@ -1,5 +0,0 @@
1if(ENABLE_VALGRIND)
2 list(APPEND PKG_CONFIG_REQUIRES_PRIVATE valgrind)
3endif()
4
5set(SOURCES eina_pass_through.c)
diff --git a/src/static_libs/draw/CMakeLists.txt b/src/static_libs/draw/CMakeLists.txt
deleted file mode 100644
index b2ad004..0000000
--- a/src/static_libs/draw/CMakeLists.txt
+++ /dev/null
@@ -1,17 +0,0 @@
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/freetype/CMakeLists.txt b/src/static_libs/freetype/CMakeLists.txt
deleted file mode 100644
index 5f669df..0000000
--- a/src/static_libs/freetype/CMakeLists.txt
+++ /dev/null
@@ -1,5 +0,0 @@
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
deleted file mode 100644
index 29bdb20..0000000
--- a/src/static_libs/lz4/CMakeLists.txt
+++ /dev/null
@@ -1,6 +0,0 @@
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
deleted file mode 100644
index 2511bc1..0000000
--- a/src/static_libs/rg_etc/CMakeLists.txt
+++ /dev/null
@@ -1,10 +0,0 @@
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
deleted file mode 100644
index 7818558..0000000
--- a/src/static_libs/triangulator/CMakeLists.txt
+++ /dev/null
@@ -1,18 +0,0 @@
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/tests/ecore_con/CMakeLists.txt b/src/tests/ecore_con/CMakeLists.txt
deleted file mode 100644
index 13ba262..0000000
--- a/src/tests/ecore_con/CMakeLists.txt
+++ /dev/null
@@ -1,13 +0,0 @@
1set(LIBRARIES
2 ecore
3 eet
4)
5
6set(SOURCES
7 ecore_con_suite.c
8 ecore_con_suite.h
9 ecore_con_test_ecore_con.c
10 ecore_con_test_ecore_con_eet.c
11 ecore_con_test_ecore_con_url.c
12 ecore_con_test_efl_net_ip_address.c
13)
diff --git a/src/tests/ector/suite/CMakeLists.txt b/src/tests/ector/suite/CMakeLists.txt
deleted file mode 100644
index 40f7717..0000000
--- a/src/tests/ector/suite/CMakeLists.txt
+++ /dev/null
@@ -1,5 +0,0 @@
1set(SOURCES
2 ector_suite.c
3 ector_suite.h
4 ector_test_init.c
5)
diff --git a/src/tests/eet/CMakeLists.txt b/src/tests/eet/CMakeLists.txt
deleted file mode 100644
index 9d4ac3a..0000000
--- a/src/tests/eet/CMakeLists.txt
+++ /dev/null
@@ -1,14 +0,0 @@
1set(SOURCES
2 eet_suite.c
3 eet_suite.h
4 eet_test_cache.c
5 eet_test_cipher.c
6 eet_test_common.c
7 eet_test_common.h
8 eet_test_connection.c
9 eet_test_data.c
10 eet_test_file.c
11 eet_test_identity.c
12 eet_test_image.c
13 eet_test_init.c
14)
diff --git a/src/tests/eeze/CMakeLists.txt b/src/tests/eeze/CMakeLists.txt
deleted file mode 100644
index 65585c4..0000000
--- a/src/tests/eeze/CMakeLists.txt
+++ /dev/null
@@ -1,12 +0,0 @@
1set(LIBRARIES
2 eeze
3)
4
5set(SOURCES
6 eeze_suite.c
7 eeze_suite.h
8 eeze_test_init.c
9 eeze_test_net.c
10 eeze_test_sensor.c
11 eeze_test_udev.c
12)
diff --git a/src/tests/eina/CMakeLists.txt b/src/tests/eina/CMakeLists.txt
deleted file mode 100644
index 5873829..0000000
--- a/src/tests/eina/CMakeLists.txt
+++ /dev/null
@@ -1,66 +0,0 @@
1set(LIBRARIES
2 m
3)
4
5set(SOURCES
6 eina_suite.c
7 eina_suite.h
8 eina_suite.x
9 eina_test_abi.c
10 eina_test_accessor.c
11 eina_test_array.c
12 eina_test_barrier.c