-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
61 lines (48 loc) · 1.68 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
cmake_minimum_required(VERSION 3.8)
project(MyFS)
#set(CMAKE_VRBOSE_MAKEFILE ON)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(MKFS
src/mkfs.myfs.cpp
src/blockdevice.cpp
src/RootDirectory.cpp
src/Fat.cpp
src/DMap.cpp
src/Logger.cpp)
set(MOUNT
src/blockdevice.cpp
src/myfs.cpp
src/wrap.cpp
src/mount.myfs.c
src/RootDirectory.cpp
src/DMap.cpp
src/Fat.cpp
src/Logger.cpp
)
#set(unittests
# src/blockdevice.cpp
# src/myfs.cpp
# unittests/main.cpp
# unittests/test-blockdevice.cpp
# unittests/test-myfs.cpp
# unittests/helper.cpp)
include_directories(includes)
set(COMPILE_FLAGS "-Wall -DFUSE_USE_VERSION=26")
add_definitions(${COMPILE_FLAGS})
add_executable(mkfs.myfs ${MKFS} includes/DMap.h src/DMap.cpp)
add_executable(mount.myfs ${MOUNT} includes/DMap.h src/DMap.cpp)
#add_executable(unittests ${UNITTESTS})
find_package(PkgConfig)
pkg_check_modules(FUSE fuse)
target_link_libraries(mkfs.myfs ${FUSE_LDFLAGS})
target_compile_options(mkfs.myfs PUBLIC ${FUSE_CFLAGS})
target_include_directories(mkfs.myfs PUBLIC ${FUSE_INCLUDE_DIRS})
target_link_libraries(mount.myfs ${FUSE_LDFLAGS})
target_compile_options(mount.myfs PUBLIC ${FUSE_CFLAGS})
target_include_directories(mount.myfs PUBLIC ${FUSE_INCLUDE_DIRS})
#target_link_libraries(unittests ${FUSE_LDFLAGS})
#target_compile_options(unittests PUBLIC ${FUSE_CFLAGS})
#target_include_directories(unittests PUBLIC ${FUSE_INCLUDE_DIRS})