forked from kotfranek/RawDiskIO
-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
52 lines (41 loc) · 1.2 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
# CMake minimum version dependency
cmake_minimum_required( VERSION 3.0.0 FATAL_ERROR )
# Project name
project( "RawDiskIO" )
# Compiler and linker flags
set( CPP_COMPILE_FLAGS "-g -Wall -std=c++11" )
set( CPP_LINK_FLAGS "-pthread" )
set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -o3 -s")
# Header files locations
include_directories(
include
)
add_library( rawdiskio SHARED
src/DiskGeometry.cpp
src/DiskManager.cpp
src/PartitionInfo.cpp
src/PartitionIO.cpp
src/PhysicalDiskInfo.cpp
src/PhysicalDiskIO.cpp
src/DeviceFile.cpp
src/File.cpp
)
# Demo application: sources
add_executable( rawdiskio-d
main.cpp
)
# Demo application: compiler definitions
target_compile_definitions( rawdiskio
PUBLIC LOG_ENABLED
)
target_compile_definitions( rawdiskio-d
PUBLIC LOG_ENABLED
)
# Demo application: required libraries
target_link_libraries( rawdiskio-d
rawdiskio
)
# Set the compiler and linker flags for particular targets
set_target_properties( rawdiskio PROPERTIES COMPILE_FLAGS ${CPP_COMPILE_FLAGS} )
set_target_properties( rawdiskio-d PROPERTIES COMPILE_FLAGS ${CPP_COMPILE_FLAGS} )
set_target_properties( rawdiskio-d PROPERTIES LINK_FLAGS ${CPP_LINK_FLAGS} )