summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <marcel-hollerbach@t-online.de>2017-02-03 10:39:23 +0100
committerMarcel Hollerbach <marcel-hollerbach@t-online.de>2017-02-03 10:59:04 +0100
commit3c0fe3ca3cda11a15e5652f8a6c0109d148d8fb6 (patch)
tree230b978d9b106ea433aa443c90fb0a8ec0b8fcb7
parent94ddd709dbae52a729179d8ad7ac4f8b06845ea3 (diff)
downloadefl-3c0fe3ca3cda11a15e5652f8a6c0109d148d8fb6.tar.gz
cmake: add eeze
there is currently a bug in the testsuite which needs to change, otherwise modules cannot be loaded. The code acutally runs when its installed and EFL_RUN_IN_TREE is not set.
-rw-r--r--CMakeLists.txt1
-rw-r--r--cmake/config/eeze.cmake24
-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/lib/eeze/CMakeLists.txt67
-rw-r--r--src/tests/eeze/CMakeLists.txt12
9 files changed, 146 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8b3ef34bf1..1565013836 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -51,6 +51,7 @@ EFL_LIB(ecore_file)
EFL_LIB(eldbus)
EFL_LIB(embryo)
EFL_LIB(ector)
+EFL_LIB(eeze)
EFL_OPTIONS_SUMMARY()
diff --git a/cmake/config/eeze.cmake b/cmake/config/eeze.cmake
new file mode 100644
index 0000000000..2ca67716a9
--- /dev/null
+++ b/cmake/config/eeze.cmake
@@ -0,0 +1,24 @@
+
+#check what versions of mount
+pkg_check_modules(MOUNT mount)
+EFL_OPTION(HAVE_EEZE_MOUNT "Whenever to use libmount" ${MOUNT_FOUND} DEPENDS MOUNT_FOUND OFF)
+CHECK_APPEND_DEFINE(HAVE_EEZE_MOUNT ${HAVE_EEZE_MOUNT})
+
+pkg_check_modules(UDEV REQUIRED udev>=148)
+
+if(NOT ${UDEV_FOUND})
+ error("Udev is required")
+endif()
+
+#todo tizen
+if(ENABLED_TIZEN)
+ pkg_check_modules(SENSORS REQUIRED capi-system-sensor>=0.1.17 )
+endif()
+
+set(EEZE_MODULE_TYPE_SENSOR_FAKE ON)
+set(EEZE_MODULE_TYPE_SENSOR_TIZEN OFF)
+set(EEZE_MODULE_TYPE_SENSOR_UDEV ON)
+
+CHECK_APPEND_DEFINE(EEZE_MOUNT_BIN \"bla\")
+CHECK_APPEND_DEFINE(EEZE_UNMOUNT_BIN \"bla\")
+CHECK_APPEND_DEFINE(EEZE_EJECT_BIN \"bla\")
diff --git a/src/bin/eeze/eeze_mount/CMakeLists.txt b/src/bin/eeze/eeze_mount/CMakeLists.txt
new file mode 100644
index 0000000000..5105678ff3
--- /dev/null
+++ b/src/bin/eeze/eeze_mount/CMakeLists.txt
@@ -0,0 +1,7 @@
+set(LIBRARIES
+ ecore_file
+)
+
+set(SOURCES
+ eeze_mount.c
+)
diff --git a/src/bin/eeze/eeze_scanner/CMakeLists.txt b/src/bin/eeze/eeze_scanner/CMakeLists.txt
new file mode 100644
index 0000000000..4f7ec95693
--- /dev/null
+++ b/src/bin/eeze/eeze_scanner/CMakeLists.txt
@@ -0,0 +1,10 @@
+set(LIBRARIES
+ eeze
+ eet
+ ecore_con
+)
+
+set(SOURCES
+ eeze_scanner.c
+ eeze_scanner.h
+)
diff --git a/src/bin/eeze/eeze_scanner_monitor/CMakeLists.txt b/src/bin/eeze/eeze_scanner_monitor/CMakeLists.txt
new file mode 100644
index 0000000000..21658678da
--- /dev/null
+++ b/src/bin/eeze/eeze_scanner_monitor/CMakeLists.txt
@@ -0,0 +1,9 @@
+set(LIBRARIES
+ eeze
+ eet
+ ecore_con
+)
+
+set(SOURCES
+ eeze_scanner_monitor.c
+)
diff --git a/src/bin/eeze/eeze_sensor_test/CMakeLists.txt b/src/bin/eeze/eeze_sensor_test/CMakeLists.txt
new file mode 100644
index 0000000000..bd18f3105b
--- /dev/null
+++ b/src/bin/eeze/eeze_sensor_test/CMakeLists.txt
@@ -0,0 +1,7 @@
+set(PKG_CONFIG_REQUIRES_PRIVATE
+ udev
+)
+
+set(SOURCES
+ eeze_sensor_test.c
+)
diff --git a/src/bin/eeze/eeze_umount/CMakeLists.txt b/src/bin/eeze/eeze_umount/CMakeLists.txt
new file mode 100644
index 0000000000..51581a227a
--- /dev/null
+++ b/src/bin/eeze/eeze_umount/CMakeLists.txt
@@ -0,0 +1,9 @@
+set(LIBRARIES
+ eeze
+ eet
+ ecore_file
+)
+
+set(SOURCES
+ eeze_umount.c
+)
diff --git a/src/lib/eeze/CMakeLists.txt b/src/lib/eeze/CMakeLists.txt
new file mode 100644
index 0000000000..c9aa9e0147
--- /dev/null
+++ b/src/lib/eeze/CMakeLists.txt
@@ -0,0 +1,67 @@
+set(DESCRIPTION "Ecore event abstraction library")
+
+set(PUBLIC_LIBRARIES
+ eina
+ ecore
+)
+
+set(LIBRARIES
+ eo
+ efl
+ ecore_con
+ ecore_file
+ eet
+ emile
+)
+
+set(PKG_CONFIG_REQUIRES_PRIVATE
+ libudev
+)
+
+
+if (${HAVE_EEZE_MOUNT})
+ list(APPEND PKG_CONFIG_REQUIRES_PRIVATE mount)
+endif()
+
+if (${ENABLE_TIZEN})
+ list(APPEND PKG_CONFIG_REQUIRES_PRIVATE capi-system-sensor)
+endif()
+
+
+set(PUBLIC_HEADERS
+ Eeze.h
+ Eeze_Disk.h
+ Eeze_Net.h
+ Eeze_Sensor.h
+)
+
+set(SOURCES
+ eeze_disk.c
+ eeze_disk_mount.c
+ eeze_disk_private.h
+ eeze_disk_udev.c
+ eeze_main.c
+ eeze_net.c
+ eeze_net_private.h
+ eeze_sensor.c
+ eeze_sensor_private.h
+ eeze_udev_find.c
+ eeze_udev_private.c
+ eeze_udev_private.h
+ eeze_udev_syspath.c
+ eeze_udev_walk.c
+ eeze_udev_watch.c
+)
+
+#mount files
+if(${HAVE_EEZE_MOUNT})
+ if (${MOUNT_VERSION} LESS 2.19.0)
+ list(APPEND SOURCES eeze_disk_libmount_old.c)
+ elseif (${MOUNT_VERSION} GREATER 2.19.0)
+ list(APPEND SOURCES eeze_disk_libmount_new.c)
+ else()
+ list(APPEND SOURCES eeze_disk_libmount.c)
+ endif()
+else()
+ list(APPEND SOURCES eeze_disk_dummy.c)
+endif()
diff --git a/src/tests/eeze/CMakeLists.txt b/src/tests/eeze/CMakeLists.txt
new file mode 100644
index 0000000000..65585c4f2d
--- /dev/null
+++ b/src/tests/eeze/CMakeLists.txt
@@ -0,0 +1,12 @@
+set(LIBRARIES
+ eeze
+)
+
+set(SOURCES
+ eeze_suite.c
+ eeze_suite.h
+ eeze_test_init.c
+ eeze_test_net.c
+ eeze_test_sensor.c
+ eeze_test_udev.c
+)