mirror of
https://github.com/vgough/encfs.git
synced 2024-11-28 19:03:42 +01:00
d1a9ccdd19
git-svn-id: http://encfs.googlecode.com/svn/trunk@123 db9cf616-1c43-0410-9cb8-a902689de0d6
65 lines
1.3 KiB
CMake
65 lines
1.3 KiB
CMake
protobuf_generate_cpp (PROTO_SRCS PROTO_HDRS ${PROJECT_SOURCE_DIR}/protos/fsconfig.proto)
|
|
|
|
include_directories (${PROJECT_BINARY_DIR}/base)
|
|
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}
|
|
${CMAKE_THREAD_LIBS_INIT}
|
|
)
|
|
|
|
add_executable (checkops
|
|
checkops.cpp
|
|
)
|
|
target_link_libraries (checkops
|
|
encfs-fs
|
|
encfs-cipher
|
|
encfs-base
|
|
${GLOG_LIBRARIES}
|
|
)
|
|
|
|
# Unit tests are optional, depends on libgtest (Google's C++ test framework).
|
|
if (GTEST_FOUND)
|
|
link_directories (${PROJECT_BINARY_DIR}/base)
|
|
link_directories (${PROJECT_BINARY_DIR}/cipher)
|
|
|
|
include_directories (${GTEST_INCLUDE_DIR})
|
|
|
|
file (GLOB TEST_FILES "*_test.cpp")
|
|
|
|
add_executable (fs-tests
|
|
MemBlockFileIO.cpp
|
|
MemFileIO.cpp
|
|
testing.cpp
|
|
${TEST_FILES}
|
|
)
|
|
|
|
target_link_libraries (fs-tests
|
|
${GTEST_BOTH_LIBRARIES}
|
|
encfs-fs
|
|
encfs-cipher
|
|
encfs-base
|
|
${GLOG_LIBRARIES}
|
|
)
|
|
|
|
add_test (FSTests fs-tests)
|
|
GTEST_ADD_TESTS (fs-tests "${FSTestArgs}" ${TEST_FILES})
|
|
endif (GTEST_FOUND)
|