summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@profusion.mobi>2017-01-26 16:16:15 -0200
committerGustavo Sverzut Barbieri <barbieri@profusion.mobi>2017-01-26 16:16:15 -0200
commit2ba33b8ff064f9c89b1febb141505f75283a549c (patch)
tree19dedbb1fd64c73ae9a575e85919dedd2e05740f
parentba9938b9506448bef752c3a6fe85041238f4916c (diff)
cmake: add eldbus.
-rw-r--r--CMakeLists.txt1
-rw-r--r--cmake/config/eldbus.cmake1
-rw-r--r--cmake/helpers/EflMacros.cmake32
-rw-r--r--src/bin/eldbus/CMakeLists.txt15
-rw-r--r--src/lib/eldbus/CMakeLists.txt70
-rw-r--r--src/tests/eldbus/CMakeLists.txt20
6 files changed, 131 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e2cb0162bd..0fbd5db3ba 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -38,6 +38,7 @@ EFL_LIB(efl)
38EFL_LIB(emile) 38EFL_LIB(emile)
39EFL_LIB(eet) 39EFL_LIB(eet)
40EFL_LIB(ecore) 40EFL_LIB(ecore)
41EFL_LIB(eldbus)
41 42
42EFL_OPTIONS_SUMMARY() 43EFL_OPTIONS_SUMMARY()
43 44
diff --git a/cmake/config/eldbus.cmake b/cmake/config/eldbus.cmake
new file mode 100644
index 0000000000..cb8eeaa5d5
--- /dev/null
+++ b/cmake/config/eldbus.cmake
@@ -0,0 +1 @@
pkg_check_modules(DBUS dbus-1 REQUIRED)
diff --git a/cmake/helpers/EflMacros.cmake b/cmake/helpers/EflMacros.cmake
index 7699db348c..8b8711f522 100644
--- a/cmake/helpers/EflMacros.cmake
+++ b/cmake/helpers/EflMacros.cmake
@@ -810,6 +810,8 @@ define_property(TARGET PROPERTY EFL_EO_PUBLIC
810# - DEFINITIONS: target_compile_definitions() 810# - DEFINITIONS: target_compile_definitions()
811# - PUBLIC_EO_FILES: the eo files will be used to build that lib, and will be installed to the filesystem 811# - PUBLIC_EO_FILES: the eo files will be used to build that lib, and will be installed to the filesystem
812# - EO_FILES: the eo files will be used to build that lib but not installed. 812# - EO_FILES: the eo files will be used to build that lib but not installed.
813# - COMPILE_FLAGS: extra CFLAGS to append.
814# - LINK_FLAGS: extra LDFLAGS to append.
813# 815#
814# Defines the following variables that can be used within the included files: 816# Defines the following variables that can be used within the included files:
815# - EFL_LIB_CURRENT to ${Name} 817# - EFL_LIB_CURRENT to ${Name}
@@ -881,6 +883,8 @@ function(EFL_LIB _target)
881 set(DEFINITIONS) 883 set(DEFINITIONS)
882 set(PUBLIC_EO_FILES) 884 set(PUBLIC_EO_FILES)
883 set(EO_FILES) 885 set(EO_FILES)
886 set(COMPILE_FLAGS)
887 set(LINK_FLAGS)
884 888
885 string(TOUPPER "${_target}" _target_uc) 889 string(TOUPPER "${_target}" _target_uc)
886 890
@@ -911,8 +915,8 @@ function(EFL_LIB _target)
911 915
912 EFL_PKG_CONFIG_EVAL(${_target} "${PKG_CONFIG_REQUIRES_PRIVATE}" "${PKG_CONFIG_REQUIRES}") 916 EFL_PKG_CONFIG_EVAL(${_target} "${PKG_CONFIG_REQUIRES_PRIVATE}" "${PKG_CONFIG_REQUIRES}")
913 917
914 set(__link_flags ${${_target}_PKG_CONFIG_REQUIRES_PRIVATE_LDFLAGS} ${${_target}_PKG_CONFIG_REQUIRES_LDFLAGS}) 918 set(__link_flags ${${_target}_PKG_CONFIG_REQUIRES_PRIVATE_LDFLAGS} ${${_target}_PKG_CONFIG_REQUIRES_LDFLAGS} ${LINK_FLAGS})
915 set(__compile_flags ${${_target}_PKG_CONFIG_REQUIRES_PRIVATE_CFLAGS} ${${_target}_PKG_CONFIG_REQUIRES_CFLAGS} -DPACKAGE_DATA_DIR=\\"${CMAKE_INSTALL_FULL_DATADIR}/${_target}/\\") 919 set(__compile_flags ${${_target}_PKG_CONFIG_REQUIRES_PRIVATE_CFLAGS} ${${_target}_PKG_CONFIG_REQUIRES_CFLAGS} -DPACKAGE_DATA_DIR=\\"${CMAKE_INSTALL_FULL_DATADIR}/${_target}/\\" ${COMPILE_FLAGS})
916 920
917 set(_link_flags) 921 set(_link_flags)
918 foreach(_l ${__link_flags}) 922 foreach(_l ${__link_flags})
@@ -1031,6 +1035,8 @@ endfunction()
1031# - LIBRARIES: results in target_link_libraries() 1035# - LIBRARIES: results in target_link_libraries()
1032# - DEFINITIONS: target_compile_definitions() 1036# - DEFINITIONS: target_compile_definitions()
1033# - INSTALL_DIR: defaults to bin. If empty, won't install. 1037# - INSTALL_DIR: defaults to bin. If empty, won't install.
1038# - COMPILE_FLAGS: extra CFLAGS to append.
1039# - LINK_FLAGS: extra LDFLAGS to append.
1034# 1040#
1035# NOTE: it's meant to be called by files included by EFL_LIB() or similar, 1041# NOTE: it's meant to be called by files included by EFL_LIB() or similar,
1036# otherwise you need to prepare the environment yourself. 1042# otherwise you need to prepare the environment yourself.
@@ -1051,6 +1057,8 @@ function(EFL_BIN _binname)
1051 set(INSTALL_DIR bin) 1057 set(INSTALL_DIR bin)
1052 set(PKG_CONFIG_REQUIRES) 1058 set(PKG_CONFIG_REQUIRES)
1053 set(PKG_CONFIG_REQUIRES_PRIVATE) 1059 set(PKG_CONFIG_REQUIRES_PRIVATE)
1060 set(COMPILE_FLAGS)
1061 set(LINK_FLAGS)
1054 1062
1055 if(_binname STREQUAL ${EFL_LIB_CURRENT}) 1063 if(_binname STREQUAL ${EFL_LIB_CURRENT})
1056 set(_binsrcdir "${EFL_BIN_SOURCE_DIR}") 1064 set(_binsrcdir "${EFL_BIN_SOURCE_DIR}")
@@ -1112,12 +1120,12 @@ function(EFL_BIN _binname)
1112 endif() 1120 endif()
1113 1121
1114 set(_link_flags) 1122 set(_link_flags)
1115 foreach(_l ${${_bintarget}_PKG_CONFIG_REQUIRES_PRIVATE_LDFLAGS}) 1123 foreach(_l ${${_bintarget}_PKG_CONFIG_REQUIRES_PRIVATE_LDFLAGS} ${LINK_FLAGS})
1116 set(_link_flags "${_link_flags} ${_l}") 1124 set(_link_flags "${_link_flags} ${_l}")
1117 endforeach() 1125 endforeach()
1118 1126
1119 set(_compile_flags) 1127 set(_compile_flags)
1120 foreach(_c ${${_bintarget}_PKG_CONFIG_REQUIRES_PRIVATE_CFLAGS}) 1128 foreach(_c ${${_bintarget}_PKG_CONFIG_REQUIRES_PRIVATE_CFLAGS} ${COMPILE_FLAGS})
1121 set(_compile_flags "${_compile_flags} ${_c}") 1129 set(_compile_flags "${_compile_flags} ${_c}")
1122 endforeach() 1130 endforeach()
1123 1131
@@ -1147,6 +1155,8 @@ endfunction()
1147# ${EFL_LIB_CURRENT}-modules 1155# ${EFL_LIB_CURRENT}-modules
1148# - LIBRARIES: results in target_link_libraries() 1156# - LIBRARIES: results in target_link_libraries()
1149# - DEFINITIONS: target_compile_definitions() 1157# - DEFINITIONS: target_compile_definitions()
1158# - COMPILE_FLAGS: extra CFLAGS to append.
1159# - LINK_FLAGS: extra LDFLAGS to append.
1150# 1160#
1151# NOTE: it's meant to be called by files included by EFL_LIB() or similar, 1161# NOTE: it's meant to be called by files included by EFL_LIB() or similar,
1152# otherwise you need to prepare the environment yourself. 1162# otherwise you need to prepare the environment yourself.
@@ -1170,6 +1180,8 @@ function(EFL_TEST _testname)
1170 set(DEFINITIONS) 1180 set(DEFINITIONS)
1171 set(PKG_CONFIG_REQUIRES) 1181 set(PKG_CONFIG_REQUIRES)
1172 set(PKG_CONFIG_REQUIRES_PRIVATE) 1182 set(PKG_CONFIG_REQUIRES_PRIVATE)
1183 set(COMPILE_FLAGS)
1184 set(LINK_FLAGS)
1173 1185
1174 if(_testname STREQUAL ${EFL_LIB_CURRENT}) 1186 if(_testname STREQUAL ${EFL_LIB_CURRENT})
1175 set(_testsrcdir "${EFL_TESTS_SOURCE_DIR}") 1187 set(_testsrcdir "${EFL_TESTS_SOURCE_DIR}")
@@ -1236,12 +1248,12 @@ function(EFL_TEST _testname)
1236 endif() 1248 endif()
1237 1249
1238 set(_link_flags) 1250 set(_link_flags)
1239 foreach(_l ${${_testtarget}_PKG_CONFIG_REQUIRES_PRIVATE_LDFLAGS}) 1251 foreach(_l ${${_testtarget}_PKG_CONFIG_REQUIRES_PRIVATE_LDFLAGS} ${LINK_FLAGS})
1240 set(_link_flags "${_link_flags} ${_l}") 1252 set(_link_flags "${_link_flags} ${_l}")
1241 endforeach() 1253 endforeach()
1242 1254
1243 set(_compile_flags) 1255 set(_compile_flags)
1244 foreach(_c ${${_testtarget}_PKG_CONFIG_REQUIRES_PRIVATE_CFLAGS}) 1256 foreach(_c ${${_testtarget}_PKG_CONFIG_REQUIRES_PRIVATE_CFLAGS} ${COMPILE_FLAGS})
1245 set(_compile_flags "${_compile_flags} ${_c}") 1257 set(_compile_flags "${_compile_flags} ${_c}")
1246 endforeach() 1258 endforeach()
1247 1259
@@ -1279,6 +1291,8 @@ endfunction()
1279# - PKG_CONFIG_REQUIRES_PRIVATE: results in 1291# - PKG_CONFIG_REQUIRES_PRIVATE: results in
1280# ${Name}_PKG_CONFIG_REQUIRES_PRIVATE. Elements after 'OPTIONAL' 1292# ${Name}_PKG_CONFIG_REQUIRES_PRIVATE. Elements after 'OPTIONAL'
1281# keyword are optional. 1293# keyword are optional.
1294# - COMPILE_FLAGS: extra CFLAGS to append.
1295# - LINK_FLAGS: extra LDFLAGS to append.
1282# 1296#
1283# NOTE: since the file will be included it shouldn't mess with global variables! 1297# NOTE: since the file will be included it shouldn't mess with global variables!
1284function(EFL_MODULE _modname) 1298function(EFL_MODULE _modname)
@@ -1314,6 +1328,8 @@ function(EFL_MODULE _modname)
1314 set(INSTALL_DIR ${_modoutdir}) 1328 set(INSTALL_DIR ${_modoutdir})
1315 set(PKG_CONFIG_REQUIRES) 1329 set(PKG_CONFIG_REQUIRES)
1316 set(PKG_CONFIG_REQUIRES_PRIVATE) 1330 set(PKG_CONFIG_REQUIRES_PRIVATE)
1331 set(COMPILE_FLAGS)
1332 set(LINK_FLAGS)
1317 1333
1318 _EFL_INCLUDE_OR_DETECT("Module ${_modtarget}" ${_modsrcdir}) 1334 _EFL_INCLUDE_OR_DETECT("Module ${_modtarget}" ${_modsrcdir})
1319 1335
@@ -1358,12 +1374,12 @@ function(EFL_MODULE _modname)
1358 target_compile_definitions(${_modtarget} PRIVATE ${DEFINITIONS}) 1374 target_compile_definitions(${_modtarget} PRIVATE ${DEFINITIONS})
1359 1375
1360 set(_link_flags) 1376 set(_link_flags)
1361 foreach(_l ${${_modtarget}_PKG_CONFIG_REQUIRES_PRIVATE_LDFLAGS}) 1377 foreach(_l ${${_modtarget}_PKG_CONFIG_REQUIRES_PRIVATE_LDFLAGS} ${LINK_FLAGS})
1362 set(_link_flags "${_link_flags} ${_l}") 1378 set(_link_flags "${_link_flags} ${_l}")
1363 endforeach() 1379 endforeach()
1364 1380
1365 set(_compile_flags) 1381 set(_compile_flags)
1366 foreach(_c ${${_modtarget}_PKG_CONFIG_REQUIRES_PRIVATE_CFLAGS}) 1382 foreach(_c ${${_modtarget}_PKG_CONFIG_REQUIRES_PRIVATE_CFLAGS} ${COMPILE_FLAGS})
1367 set(_compile_flags "${_compile_flags} ${_c}") 1383 set(_compile_flags "${_compile_flags} ${_c}")
1368 endforeach() 1384 endforeach()
1369 1385
diff --git a/src/bin/eldbus/CMakeLists.txt b/src/bin/eldbus/CMakeLists.txt
new file mode 100644
index 0000000000..f83a09a310
--- /dev/null
+++ b/src/bin/eldbus/CMakeLists.txt
@@ -0,0 +1,15 @@
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/lib/eldbus/CMakeLists.txt b/src/lib/eldbus/CMakeLists.txt
new file mode 100644
index 0000000000..ecbea4cdb9
--- /dev/null
+++ b/src/lib/eldbus/CMakeLists.txt
@@ -0,0 +1,70 @@
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/tests/eldbus/CMakeLists.txt b/src/tests/eldbus/CMakeLists.txt
new file mode 100644
index 0000000000..df058f95aa
--- /dev/null
+++ b/src/tests/eldbus/CMakeLists.txt
@@ -0,0 +1,20 @@
1set(SOURCES
2 eldbus_fake_server.c
3 eldbus_fake_server.h
4 eldbus_suite.c
5 eldbus_suite.h
6 eldbus_test_eldbus_init.c
7 eldbus_test_eldbus_model.c
8 eldbus_test_eldbus_model.h
9 eldbus_test_eldbus_model_connection.c
10 eldbus_test_eldbus_model_method.c
11 eldbus_test_eldbus_model_object.c
12 eldbus_test_eldbus_model_proxy.c
13 eldbus_test_eldbus_model_signal.c
14 eldbus_test_fake_server_eldbus_model_proxy.c
15)
16
17set(LIBRARIES
18 ecore
19 eina
20)