mirror of
https://github.com/vgough/encfs.git
synced 2024-11-23 00:13:20 +01:00
fb9a8ff879
git-svn-id: http://encfs.googlecode.com/svn/trunk@92 db9cf616-1c43-0410-9cb8-a902689de0d6
57 lines
1.2 KiB
CMake
57 lines
1.2 KiB
CMake
find_package (FUSE REQUIRED)
|
|
include_directories (${FUSE_INCLUDE_DIR})
|
|
|
|
enable_testing ()
|
|
find_package (GTest)
|
|
|
|
add_library (encfs-fs
|
|
encfs.cpp
|
|
Context.cpp
|
|
FileIO.cpp
|
|
RawFileIO.cpp
|
|
BlockFileIO.cpp
|
|
CipherFileIO.cpp
|
|
MACFileIO.cpp
|
|
NameIO.cpp
|
|
StreamNameIO.cpp
|
|
BlockNameIO.cpp
|
|
NullNameIO.cpp
|
|
DirNode.cpp
|
|
FileNode.cpp
|
|
FileUtils.cpp
|
|
${PROTO_SRCS}
|
|
${PROTO_HDRS}
|
|
)
|
|
|
|
target_link_libraries (encfs-fs
|
|
${PROTOBUF_LIBRARY}
|
|
)
|
|
|
|
# Unit tests are optional, depends on libgtest (Google's C++ test framework).
|
|
if (GTEST_FOUND)
|
|
link_directories (${Encfs_BINARY_DIR}/base)
|
|
link_directories (${Encfs_BINARY_DIR}/cipher)
|
|
|
|
include_directories (${GTEST_INCLUDE_DIR})
|
|
add_executable (unittests
|
|
MemBlockFileIO.cpp
|
|
MemFileIO.cpp
|
|
testing.cpp
|
|
test_IO.cpp
|
|
test_BlockIO.cpp
|
|
)
|
|
|
|
target_link_libraries (unittests
|
|
${GTEST_BOTH_LIBRARIES}
|
|
encfs-fs
|
|
encfs-cipher
|
|
encfs-base
|
|
${GLOG_LIBRARIES}
|
|
)
|
|
|
|
add_test (UnitTests unittests)
|
|
GTEST_ADD_TESTS (unittests "${UnitTestArgs}" test_IO.cpp test_BlockIO.cpp)
|
|
add_custom_target (test COMMAND ${CMAKE_CTEST_COMMAND} DEPENDS unittests)
|
|
|
|
endif (GTEST_FOUND)
|