From 32f6706701dbe089098db59f5bf6b3b94bba6568 Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Sat, 9 Jan 2021 19:29:55 +0100 Subject: [PATCH 1/3] cmake: add back installation of ydotool{,d} --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3dd15bf..5ea7055 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -67,7 +67,9 @@ include_directories(${cxxopts_SOURCE_DIR}/include) add_executable(ydotoold ${SOURCE_FILES_DAEMON}) target_link_libraries(ydotoold PUBLIC cxxopts uInputPlus evdevPlus) +install(TARGETS ydotoold DESTINATION ${CMAKE_INSTALL_BINDIR}) add_library(ydotool_library STATIC ${SOURCE_FILES_LIBRARY}) add_executable(ydotool ${SOURCE_FILES_CLIENT}) target_link_libraries(ydotool ydotool_library dl pthread uInputPlus evdevPlus) +install(TARGETS ydotool DESTINATION ${CMAKE_INSTALL_BINDIR}) From 32fb2f37f34a2b43e7f8af130648576491b9bd09 Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Sat, 9 Jan 2021 19:31:01 +0100 Subject: [PATCH 2/3] cmake: add installation of ydotoold service file --- CMakeLists.txt | 2 ++ Daemon/CMakeLists.txt | 1 + 2 files changed, 3 insertions(+) create mode 100644 Daemon/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 5ea7055..80728d7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -73,3 +73,5 @@ add_library(ydotool_library STATIC ${SOURCE_FILES_LIBRARY}) add_executable(ydotool ${SOURCE_FILES_CLIENT}) target_link_libraries(ydotool ydotool_library dl pthread uInputPlus evdevPlus) install(TARGETS ydotool DESTINATION ${CMAKE_INSTALL_BINDIR}) + +add_subdirectory(Daemon) diff --git a/Daemon/CMakeLists.txt b/Daemon/CMakeLists.txt new file mode 100644 index 0000000..4979db3 --- /dev/null +++ b/Daemon/CMakeLists.txt @@ -0,0 +1 @@ +install(FILES ydotool.service DESTINATION /usr/lib/systemd/user/) From dca43744e7aa6a9a39043ad2587248dd4d8a155b Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Sat, 9 Jan 2021 19:31:23 +0100 Subject: [PATCH 3/3] cmake: add generation & installation of man pages --- CMakeLists.txt | 1 + manpage/CMakeLists.txt | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 manpage/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 80728d7..2b46421 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -75,3 +75,4 @@ target_link_libraries(ydotool ydotool_library dl pthread uInputPlus evdevPlus) install(TARGETS ydotool DESTINATION ${CMAKE_INSTALL_BINDIR}) add_subdirectory(Daemon) +add_subdirectory(manpage) diff --git a/manpage/CMakeLists.txt b/manpage/CMakeLists.txt new file mode 100644 index 0000000..c749dfc --- /dev/null +++ b/manpage/CMakeLists.txt @@ -0,0 +1,9 @@ +function(man_page section page) + set(src "${CMAKE_CURRENT_SOURCE_DIR}/${page}.${section}.scd") + set(bin "${CMAKE_CURRENT_BINARY_DIR}/${page}.${section}") + add_custom_target(${page}.${section} ALL COMMAND scdoc < ${src} > ${bin}) + install(FILES ${bin} DESTINATION ${CMAKE_INSTALL_MANDIR}/man${section}/) +endfunction(man_page) + +man_page(1 ydotool) +man_page(8 ydotoold)