man page: improve it and install it.
[rrq/fuse_xattrs.git] / CMakeLists.txt
index 2fcfc96f802431872882b58b16fe91d298664b3f..9f2d870c2ebc54719578cdaf18addb5deaf36d29 100644 (file)
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
 project(fuse_xattrs C)
 
 set(FUSE_XATTRS_VERSION_MAJOR 0)
@@ -19,6 +19,11 @@ include_directories(
         "${PROJECT_BINARY_DIR}"
 )
 
+configure_file (
+        "${PROJECT_SOURCE_DIR}/fuse_xattrs.1.in"
+        "${PROJECT_BINARY_DIR}/fuse_xattrs.1"
+)
+
 # Check xattr headers
 include (CheckIncludeFile)
 check_include_file (sys/xattr.h HAVE_SYS_XATTR_H)
@@ -67,6 +72,11 @@ target_link_libraries (
 )
 
 install (TARGETS fuse_xattrs DESTINATION bin)
+install (
+        FILES ${CMAKE_CURRENT_BINARY_DIR}/fuse_xattrs.1
+        DESTINATION man/man1
+        COMPONENT doc
+)
 
 enable_testing()
 configure_file(run_tests.sh run_tests.sh COPYONLY)