cmake: add eeze
authorMarcel Hollerbach <marcel-hollerbach@t-online.de>
Fri, 3 Feb 2017 09:39:23 +0000 (10:39 +0100)
committerMarcel Hollerbach <marcel-hollerbach@t-online.de>
Fri, 3 Feb 2017 09:59:04 +0000 (10:59 +0100)
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.

CMakeLists.txt
cmake/config/eeze.cmake [new file with mode: 0644]
src/bin/eeze/eeze_mount/CMakeLists.txt [new file with mode: 0644]
src/bin/eeze/eeze_scanner/CMakeLists.txt [new file with mode: 0644]
src/bin/eeze/eeze_scanner_monitor/CMakeLists.txt [new file with mode: 0644]
src/bin/eeze/eeze_sensor_test/CMakeLists.txt [new file with mode: 0644]
src/bin/eeze/eeze_umount/CMakeLists.txt [new file with mode: 0644]
src/lib/eeze/CMakeLists.txt [new file with mode: 0644]
src/tests/eeze/CMakeLists.txt [new file with mode: 0644]

index 8b3ef34..1565013 100644 (file)
@@ -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 (file)
index 0000000..2ca6771
--- /dev/null
@@ -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 (file)
index 0000000..5105678
--- /dev/null
@@ -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 (file)
index 0000000..4f7ec95
--- /dev/null
@@ -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 (file)
index 0000000..2165867
--- /dev/null
@@ -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 (file)
index 0000000..bd18f31
--- /dev/null
@@ -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 (file)
index 0000000..51581a2
--- /dev/null
@@ -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 (file)
index 0000000..c9aa9e0
--- /dev/null
@@ -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 (file)
index 0000000..65585c4
--- /dev/null
@@ -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
+)