aboutsummaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authorRobert Tari <robert@tari.in>2021-01-24 03:38:44 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-01-27 17:10:40 +0100
commitb85daf94830a3ca39d59237fdb07bc33ede1c450 (patch)
tree8d704b1d8614759da71fbe42dca737c0e2261142 /src/CMakeLists.txt
parent9b8fb0492c8c05630644d840aef520f3c6b17829 (diff)
downloadayatana-indicator-keyboard-b85daf94830a3ca39d59237fdb07bc33ede1c450.tar.gz
ayatana-indicator-keyboard-b85daf94830a3ca39d59237fdb07bc33ede1c450.tar.bz2
ayatana-indicator-keyboard-b85daf94830a3ca39d59237fdb07bc33ede1c450.zip
100% re-write of the keyboard indicator in plain C.
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
new file mode 100644
index 00000000..3eb7caf9
--- /dev/null
+++ b/src/CMakeLists.txt
@@ -0,0 +1,28 @@
+cmake_minimum_required(VERSION 2.8.12)
+set (SERVICE_LIB "ayatanaindicatorkeyboardservice")
+set (SERVICE_EXEC "ayatana-indicator-keyboard-service")
+
+add_definitions(-DG_LOG_DOMAIN="ayatana-indicator-keyboard")
+
+# handwritten sources
+set(SERVICE_MANUAL_SOURCES keyboard.c service.c utils.c)
+
+# generated sources
+set(SERVICE_GENERATED_SOURCES)
+
+# add the bin dir to our include path so the code can find the generated header files
+include_directories(${CMAKE_CURRENT_BINARY_DIR})
+
+# add warnings/coverage info on handwritten files but not the autogenerated ones...
+set_source_files_properties(${SERVICE_MANUAL_SOURCES} PROPERTIES COMPILE_FLAGS "${C_WARNING_ARGS} -g -std=c99")
+
+# the service library for tests to link against (basically, everything except main())
+add_library(${SERVICE_LIB} STATIC ${SERVICE_MANUAL_SOURCES} ${SERVICE_GENERATED_SOURCES})
+include_directories(${CMAKE_SOURCE_DIR})
+link_directories(${SERVICE_DEPS_LIBRARY_DIRS})
+
+# the executable: lib + main()
+add_executable (${SERVICE_EXEC} main.c)
+set_source_files_properties(${SERVICE_SOURCES} main.c PROPERTIES COMPILE_FLAGS "${C_WARNING_ARGS} -std=c99")
+target_link_libraries (${SERVICE_EXEC} ${SERVICE_LIB} ${SERVICE_DEPS_LIBRARIES})
+install (TARGETS ${SERVICE_EXEC} RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_PKGLIBEXECDIR})