blob: 5807d66d0a04f841ddd1051bddb2c42dccb2dc3a (
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
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c8474b9..91c967a 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -83,9 +83,16 @@ else(TASK_SPOOLER_COMPILE_CUDA)
add_definitions(-DCPU)
endif(TASK_SPOOLER_COMPILE_CUDA)
+# Man pages
+add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/man1/ts.1
+ COMMAND ${CMAKE_CURRENT_BINARY_DIR}/makeman
+ DEPENDS makeman
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/man1)
+add_custom_target(man ALL
+ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/man1/ts.1)
+
# install
-install(CODE "execute_process(COMMAND install -c -d /usr/local/bin)")
-install(CODE "execute_process(COMMAND install -c ts /usr/local/bin)")
-install(CODE "execute_process(COMMAND ./makeman)")
-install(CODE "execute_process(COMMAND install -c -d /usr/local/share/man/man1)")
-install(CODE "execute_process(COMMAND install -c -m 644 ts.1 /usr/local/share/man/man1)")
+install(TARGETS ${target}
+ RUNTIME)
+install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/man1
+ TYPE MAN)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 91c967a..5d3e0a5 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -84,6 +84,7 @@ else(TASK_SPOOLER_COMPILE_CUDA)
endif(TASK_SPOOLER_COMPILE_CUDA)
# Man pages
+file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/man1)
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/man1/ts.1
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/makeman
DEPENDS makeman
|