Namespaces are disabled by default (can be enabled at runtime with a flag). OSX compa...
[rrq/fuse_xattrs.git] / CMakeLists.txt
index 0ebd0b2b041968dd6e36838a354c3df9d2bf4f60..b7403a4d63fe796cb3d4ac4fb66d6a6b8268e963 100644 (file)
@@ -2,7 +2,7 @@ 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(FUSE_XATTRS_VERSION_MINOR 3)
 
 set(BINARY_SIDECAR_EXT \".xattr\")
 
@@ -34,11 +34,11 @@ endif()
 include (CheckCSourceCompiles)
 check_c_source_compiles ("
   #include <sys/types.h>
-  #include <attr/xattr.h>
+  #include <sys/xattr.h>
   int main() { return 1; }
-  " HAVE_ATTR_XATTR_H)
-if(NOT HAVE_ATTR_XATTR_H)
-    message(FATAL_ERROR "attr/xattr.h not found")
+  " HAVE_SYS_XATTR_H)
+if(NOT HAVE_SYS_XATTR_H)
+    message(FATAL_ERROR "sys/xattr.h not found")
 endif()
 
 # set required definitions
@@ -68,15 +68,23 @@ set(SOURCE_FILES
 
 add_executable(fuse_xattrs ${SOURCE_FILES})
 
-target_link_libraries (
-        fuse_xattrs
-        fuse
-)
+if(APPLE)
+    target_link_libraries (
+            fuse_xattrs
+            osxfuse
+    )
+else()
+    target_link_libraries (
+            fuse_xattrs
+            fuse
+    )
+endif()
+
 
 install (TARGETS fuse_xattrs DESTINATION bin)
 install (
         FILES ${CMAKE_CURRENT_BINARY_DIR}/fuse_xattrs.1
-        DESTINATION man/man1
+        DESTINATION share/man/man1
         COMPONENT doc
 )