support for hidding sidecar files.
[rrq/fuse_xattrs.git] / CMakeLists.txt
index 4b4f27fb78b51aa135162de3e6348bc84557e034..9f2d870c2ebc54719578cdaf18addb5deaf36d29 100644 (file)
@@ -1,6 +1,29 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
 project(fuse_xattrs C)
 
+set(FUSE_XATTRS_VERSION_MAJOR 0)
+set(FUSE_XATTRS_VERSION_MINOR 2)
+
+set(BINARY_SIDECAR_EXT \".xattr\")
+
+set(MAX_METADATA_SIZE "8*1024*1024")  # 8 MiB
+set(XATTR_NAME_MAX 255)               # chars in an extended attribute name
+set(XATTR_SIZE_MAX 65536)             # size of an extended attribute value (64k)
+set(XATTR_LIST_MAX 65536)             # size of extended attribute namelist (64k)
+
+configure_file (
+        "${PROJECT_SOURCE_DIR}/fuse_xattrs_config.h.in"
+        "${PROJECT_BINARY_DIR}/fuse_xattrs_config.h"
+)
+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)
@@ -35,17 +58,11 @@ if(ENABLE_CODECOVERAGE)
 endif(ENABLE_CODECOVERAGE)
 
 set(SOURCE_FILES
-        compat/fuse_opt.c
-        compat/fuse_opt.h
         fuse_xattrs.c
         passthrough.c
-        passthrough.h
         binary_storage.c
-        binary_storage.h
         utils.c
-        utils.h
-        const.h
-        fuse_xattrs_config.h)
+)
 
 add_executable(fuse_xattrs ${SOURCE_FILES})
 
@@ -55,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)