summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2015-09-03 18:13:24 +0200
committerNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2015-09-03 18:13:24 +0200
commit385a3d17995dafde4f2b57f8d3a42d4d4782119d (patch)
tree13422e28afbb7e8957ad061c662d159c28a930c4 /CMakeLists.txt
parent480288ca001564fa8c9fbdd72be442bbe7ee3d97 (diff)
Now support 'real' relative input devices, introduces 'options', the virtual device name is now prefixed to help matching it with udev.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt44
1 files changed, 36 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3d274bd..003697f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,5 @@
-cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
+cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
+# 3.0 introduces line continuation.
project("relabsd")
@@ -66,10 +67,37 @@ else ()
endif (RELABSD_ENABLE_ERROR_LOCATION)
-option(RELABSD_REAL_FUZZ "Fuzz is relative to the real device's events." ON)
-if (RELABSD_REAL_FUZZ)
- target_compile_definitions(relabsd PUBLIC RELABSD_REAL_FUZZ)
- message(STATUS "[OPTION] Fuzz is relative to the real device's events.")
-else ()
- message(STATUS "[OPTION] Fuzz is relative to the emulated device's events.")
-endif (RELABSD_REAL_FUZZ)
+set(
+ RELABSD_OPTION_MAX_SIZE
+ "64"
+ CACHE
+ INTEGER
+ "Maximum number of characters in an axis option (name + params)."
+)
+target_compile_definitions(
+ relabsd
+ PUBLIC
+ "-DRELABSD_OPTION_MAX_SIZE=${RELABSD_OPTION_MAX_SIZE}"
+)
+message(
+ STATUS
+ "[OPTION] Axis options can contain up to ${RELABSD_OPTION_MAX_SIZE}\
+ characters (name + params)."
+)
+
+set(
+ RELABSD_DEVICE_PREFIX
+ "relabsd:"
+ CACHE
+ STRING
+ "String prefixing the name of the virtual device."
+)
+target_compile_definitions(
+ relabsd
+ PUBLIC
+ "-DRELABSD_DEVICE_PREFIX=\"${RELABSD_DEVICE_PREFIX}\""
+)
+message(
+ STATUS
+ "[OPTION] Virtual devices' names are prefixed by '${RELABSD_DEVICE_PREFIX}'."
+)