-
Notifications
You must be signed in to change notification settings - Fork 654
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dokan_fuse: Add cmake-install target
This adds an install target that installs the headers in the same directory structure as libfuse. This makes it easy to support compiling against either libfuse or libdokanfuse1 from the same codebase. This fixes #250 for manual compilations under Cygwin or for MingW.
- Loading branch information
Showing
2 changed files
with
37 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,37 @@ | ||
cmake_minimum_required(VERSION 2.8.4) | ||
|
||
project (dokanfuse1) | ||
|
||
set(CMAKE_LEGACY_CYGWIN_WIN32 0) | ||
cmake_minimum_required(VERSION 2.8.5) | ||
project(dokanfuse1) | ||
include(GNUInstallDirs) | ||
|
||
if(NOT CMAKE_BUILD_TYPE) | ||
message("No CMAKE_BUILD_TYPE specified, defaulting to Release") | ||
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel." FORCE) | ||
endif(NOT CMAKE_BUILD_TYPE) | ||
|
||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -mwin32") | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -mwin32 -Wall") | ||
add_definitions(-D_FILE_OFFSET_BITS=64) | ||
include_directories( | ||
${CMAKE_CURRENT_SOURCE_DIR}/include | ||
${CMAKE_CURRENT_SOURCE_DIR}/../sys | ||
) | ||
|
||
file(GLOB source src/*.cpp src/*.c) | ||
|
||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include | ||
${CMAKE_CURRENT_SOURCE_DIR}/../sys) | ||
file(GLOB sources src/*.cpp src/*.c) | ||
set(install_headers | ||
include/fuse.h | ||
include/fuse_common.h | ||
include/fuse_opt.h | ||
include/fuse_sem_fix.h | ||
include/fuse_win.h | ||
include/utils.h | ||
) | ||
set(compat_headers | ||
include/old/fuse.h | ||
) | ||
add_library(dokanfuse1 SHARED ${sources}) | ||
|
||
add_library(dokanfuse1 SHARED ${source}) | ||
INSTALL(FILES ${install_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/fuse/) | ||
INSTALL(FILES ${compat_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) | ||
INSTALL(TARGETS dokanfuse1 | ||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} | ||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* | ||
This header is for compatibility with older software using FUSE. | ||
Please use 'pkg-config --cflags fuse' to set include path. The | ||
correct usage is still '#include <fuse.h>', not '#include | ||
<fuse/fuse.h>'. | ||
*/ | ||
|
||
#include "fuse/fuse.h" |