forked from rpodgorny/unionfs-fuse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
44 lines (34 loc) · 1.27 KB
/
CMakeLists.txt
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
40
41
42
43
44
cmake_minimum_required(VERSION 3.8)
project(unionfs-fuse VERSION 3.3
DESCRIPTION "user-space implementation of union filesystem (with help of fuse)"
LANGUAGES C)
INCLUDE(CheckIncludeFiles)
# Set a default build type for single-configuration
# CMake generators if no build type is set.
IF(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE RelWithDebInfo)
ENDIF(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
option(WITH_XATTR "Enable support for extended attributes" ON)
IF (WITH_XATTR)
CHECK_INCLUDE_FILES("sys/xattr.h" HAVE_LIBC_XATTR)
CHECK_INCLUDE_FILES("attr/xattr.h" HAVE_LIBATTR_XATTR)
IF (HAVE_LIBC_XATTR)
add_definitions(-DLIBC_XATTR)
ELSEIF(HAVE_LIBATTR_XATTR)
add_definitions(-DLIBATTR_XATTR)
ENDIF()
IF (NOT HAVE_LIBC_XATTR AND NOT HAVE_LIBATTR_XATTR)
add_definitions(-DDISABLE_XATTR)
ENDIF()
ELSE (WITH_XATTR)
add_definitions(-DDISABLE_XATTR)
ENDIF (WITH_XATTR)
if (UNIX AND APPLE)
find_library(MACFUSE_PATH fuse-t HINTS /usr/local/lib)
add_definitions(-D_FILE_OFFSET_BITS=64)
get_filename_component(MACFUSE_DIRECTORY ${MACFUSE_PATH} DIRECTORY)
link_directories(${MACFUSE_DIRECTORY})
endif()
INSTALL(PROGRAMS mount.unionfs DESTINATION sbin)
add_subdirectory(src)
add_subdirectory(man)