Cygwin, configure cmake

This commit is contained in:
benrubson 2018-03-26 22:09:57 +02:00
parent 9197385331
commit 89215f16c5
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,5 @@
set(CMAKE_LEGACY_CYGWIN_WIN32 0)
# 3.0.2 preferred, but we can often get by with 2.8. # 3.0.2 preferred, but we can often get by with 2.8.
cmake_minimum_required(VERSION 2.8) cmake_minimum_required(VERSION 2.8)
if (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION} LESS 3.0.2) if (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION} LESS 3.0.2)
@ -73,7 +75,7 @@ if (APPLE)
endif() endif()
endif() endif()
if (WIN32 OR APPLE) if (CYGWIN OR WIN32 OR APPLE)
set(DEFAULT_CASE_INSENSITIVE TRUE) set(DEFAULT_CASE_INSENSITIVE TRUE)
else() else()
set(DEFAULT_CASE_INSENSITIVE FALSE) set(DEFAULT_CASE_INSENSITIVE FALSE)
@ -83,6 +85,10 @@ endif()
find_package (FUSE REQUIRED) find_package (FUSE REQUIRED)
include_directories (SYSTEM ${FUSE_INCLUDE_DIR}) include_directories (SYSTEM ${FUSE_INCLUDE_DIR})
add_definitions (-D_FILE_OFFSET_BITS=64 -DFUSE_USE_VERSION=29) add_definitions (-D_FILE_OFFSET_BITS=64 -DFUSE_USE_VERSION=29)
if (CYGWIN)
# Cygwin build is intended to use WinFsp
add_definitions(-DCYGFUSE)
endif()
# Check for OpenSSL. # Check for OpenSSL.
find_package (OpenSSL REQUIRED) find_package (OpenSSL REQUIRED)

View File

@ -1089,7 +1089,7 @@ RootPtr createV6Config(EncFS_Context *ctx,
alg = findCipherAlgorithm("AES", keySize); alg = findCipherAlgorithm("AES", keySize);
// If case-insensitive system, opt for Block32 filename encoding // If case-insensitive system, opt for Block32 filename encoding
#if defined(__APPLE__) || defined(WIN32) #if defined(DEFAULT_CASE_INSENSITIVE)
nameIOIface = BlockNameIO::CurrentInterface(true); nameIOIface = BlockNameIO::CurrentInterface(true);
#else #else
nameIOIface = BlockNameIO::CurrentInterface(); nameIOIface = BlockNameIO::CurrentInterface();