mirror of
https://github.com/vgough/encfs.git
synced 2024-11-22 16:03:34 +01:00
33b8c00a67
git-svn-id: http://encfs.googlecode.com/svn/trunk@102 db9cf616-1c43-0410-9cb8-a902689de0d6
54 lines
1.2 KiB
CMake
54 lines
1.2 KiB
CMake
link_directories (${Encfs_BINARY_DIR}/base)
|
|
|
|
if (WITH_COMMON_CRYPTO)
|
|
set (EXTRA_LIBS ${SECURITY_FRAMEWORK})
|
|
set (EXTRA_SOURCE CommonCrypto.cpp)
|
|
elseif (WITH_OPENSSL)
|
|
include_directories (${OPENSSL_INCLUDE_DIR})
|
|
set (EXTRA_LIBS ${OPENSSL_LIBRARIES})
|
|
set (EXTRA_SOURCE openssl.cpp)
|
|
elseif (WITH_BOTAN)
|
|
set (EXTRA_LIBS ${BOTAN_LIBRARIES})
|
|
set (EXTRA_SOURCE botan.cpp)
|
|
include_directories (${BOTAN_INCLUDE_DIR})
|
|
endif (WITH_COMMON_CRYPTO)
|
|
|
|
add_library (encfs-cipher
|
|
BlockCipher.cpp
|
|
CipherKey.cpp
|
|
CipherV1.cpp
|
|
MAC.cpp
|
|
MemoryPool.cpp
|
|
NullCiphers.cpp
|
|
PBKDF.cpp
|
|
readpassphrase.cpp
|
|
StreamCipher.cpp
|
|
${EXTRA_SOURCE}
|
|
)
|
|
|
|
target_link_libraries (encfs-cipher
|
|
${EXTRA_LIBS}
|
|
)
|
|
|
|
if (GTEST_FOUND)
|
|
link_directories (${PROJECT_BINARY_DIR}/base)
|
|
include_directories (${GTEST_INCLUDE_DIR})
|
|
|
|
file (GLOB TEST_FILES "*_test.cpp")
|
|
|
|
add_executable (cipher-tests
|
|
testing.cpp
|
|
${TEST_FILES}
|
|
)
|
|
|
|
target_link_libraries (cipher-tests
|
|
${GTEST_BOTH_LIBRARIES}
|
|
encfs-cipher
|
|
encfs-base
|
|
${GLOG_LIBRARIES}
|
|
)
|
|
|
|
add_test (CipherTests cipher-tests)
|
|
GTEST_ADD_TESTS (cipher-tests "${CipherTestArgs}" ${TEST_FILES})
|
|
endif (GTEST_FOUND)
|