summaryrefslogtreecommitdiff
blob: bb46f5e37b936a248af15daf93d152ed0c48dcac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
From 7ddb3b8dec442fd1bd502dc7b97841bb07526cae Mon Sep 17 00:00:00 2001
From: Andreas Sturmlechner <asturm@gentoo.org>
Date: Sun, 26 Jul 2020 16:47:22 +0200
Subject: [PATCH] Add cmake buildsystem

---
 CMakeLists.txt | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 CMakeLists.txt

diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..42dca7d
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,32 @@
+cmake_minimum_required(VERSION 3.15)
+
+project(xsettingsd VERSION 1.0.0)
+
+include(GNUInstallDirs)
+
+find_package(X11 REQUIRED)
+
+set(libxsettingsd_SRCS
+    common.cc
+    config_parser.cc
+    data_reader.cc
+    data_writer.cc
+    setting.cc
+    settings_manager.cc
+)
+
+add_library(libxsettingsd STATIC ${libxsettingsd_SRCS})
+
+add_executable(xsettingsd xsettingsd.cc)
+add_executable(dump_xsettings dump_xsettings.cc)
+
+target_include_directories(xsettingsd PUBLIC "${PROJECT_BINARY_DIR}")
+target_include_directories(dump_xsettings PUBLIC "${PROJECT_BINARY_DIR}")
+
+target_link_libraries(xsettingsd PUBLIC libxsettingsd X11::X11)
+target_link_libraries(dump_xsettings PUBLIC libxsettingsd X11::X11)
+
+install(TARGETS xsettingsd DESTINATION ${CMAKE_INSTALL_BINDIR})
+install(TARGETS dump_xsettings DESTINATION ${CMAKE_INSTALL_BINDIR})
+
+install(FILES xsettingsd.1 dump_xsettings.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
-- 
2.27.0