encfs/cmake/FindFUSE.cmake

34 lines
872 B
CMake
Raw Permalink Normal View History

2015-06-14 07:08:13 +02:00
# Find the FUSE includes and library
#
# FUSE_INCLUDE_DIR - where to find fuse.h, etc.
# FUSE_LIBRARIES - List of libraries when using FUSE.
# FUSE_FOUND - True if FUSE lib is found.
# check if already in cache, be silent
2015-06-16 17:03:02 +02:00
if (FUSE_INCLUDE_DIR)
2015-06-14 07:08:13 +02:00
SET (FUSE_FIND_QUIETLY TRUE)
2015-06-16 17:03:02 +02:00
endif (FUSE_INCLUDE_DIR)
2015-06-14 07:08:13 +02:00
if (APPLE)
2015-06-16 17:03:02 +02:00
set (FUSE_NAMES libosxfuse.dylib fuse)
set (FUSE_SUFFIXES osxfuse fuse)
2015-06-14 07:08:13 +02:00
else (APPLE)
2015-06-16 17:03:02 +02:00
set (FUSE_NAMES fuse)
set (FUSE_SUFFIXES fuse)
2015-06-14 07:08:13 +02:00
endif (APPLE)
2015-06-16 17:03:02 +02:00
# find includes
find_path (FUSE_INCLUDE_DIR fuse.h
PATHS /opt /opt/local /usr/pkg
PATH_SUFFIXES ${FUSE_SUFFIXES})
# find lib
find_library (FUSE_LIBRARIES NAMES ${FUSE_NAMES})
2015-06-14 07:08:13 +02:00
include ("FindPackageHandleStandardArgs")
find_package_handle_standard_args ("FUSE" DEFAULT_MSG
FUSE_INCLUDE_DIR FUSE_LIBRARIES)
mark_as_advanced (FUSE_INCLUDE_DIR FUSE_LIBRARIES)