2013-01-29 04:07:54 +01:00
|
|
|
link_directories (${Encfs_BINARY_DIR}/base)
|
|
|
|
|
2013-03-05 07:39:51 +01:00
|
|
|
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)
|
2013-03-06 09:02:23 +01:00
|
|
|
elseif (WITH_BOTAN)
|
|
|
|
set (EXTRA_LIBS ${BOTAN_LIBRARIES})
|
|
|
|
set (EXTRA_SOURCE botan.cpp)
|
2013-06-17 05:11:46 +02:00
|
|
|
include_directories (${BOTAN_INCLUDE_DIR})
|
2013-03-05 07:39:51 +01:00
|
|
|
endif (WITH_COMMON_CRYPTO)
|
|
|
|
|
2013-01-29 04:07:54 +01:00
|
|
|
add_library (encfs-cipher
|
2013-03-05 07:29:58 +01:00
|
|
|
BlockCipher.cpp
|
2013-01-29 04:07:54 +01:00
|
|
|
CipherKey.cpp
|
2013-03-05 07:36:32 +01:00
|
|
|
CipherV1.cpp
|
2013-03-05 07:32:27 +01:00
|
|
|
MAC.cpp
|
2013-01-29 04:07:54 +01:00
|
|
|
MemoryPool.cpp
|
2013-03-05 07:36:32 +01:00
|
|
|
NullCiphers.cpp
|
2013-03-05 07:32:27 +01:00
|
|
|
PBKDF.cpp
|
|
|
|
readpassphrase.cpp
|
|
|
|
StreamCipher.cpp
|
2013-03-05 07:39:51 +01:00
|
|
|
${EXTRA_SOURCE}
|
2013-01-29 04:07:54 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
target_link_libraries (encfs-cipher
|
2013-03-05 07:39:51 +01:00
|
|
|
${EXTRA_LIBS}
|
2013-01-29 04:07:54 +01:00
|
|
|
)
|
|
|
|
|
2013-03-05 07:32:27 +01:00
|
|
|
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}
|
|
|
|
)
|
2013-01-29 04:07:54 +01:00
|
|
|
|
2013-03-05 07:32:27 +01:00
|
|
|
add_test (CipherTests cipher-tests)
|
|
|
|
GTEST_ADD_TESTS (cipher-tests "${CipherTestArgs}" ${TEST_FILES})
|
|
|
|
endif (GTEST_FOUND)
|