-
-
Notifications
You must be signed in to change notification settings - Fork 104
/
Copy pathCMakeLists.txt
91 lines (78 loc) · 2.59 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
cmake_minimum_required(VERSION 3.13)
project(QHexView)
option(QHEXVIEW_BUILD_EXAMPLE "Build Example Application" ON)
option(QHEXVIEW_USE_QT5 "Enable Qt5 build" OFF)
option(QHEXVIEW_ENABLE_DIALOGS "BuiltIn dialogs" OFF)
if(QHEXVIEW_USE_QT5)
find_package(Qt5 REQUIRED COMPONENTS Widgets)
else()
find_package(Qt6 COMPONENTS Widgets)
if(NOT Qt6_FOUND)
find_package(Qt5 REQUIRED COMPONENTS Widgets)
endif()
endif()
add_library(${PROJECT_NAME} STATIC)
set_target_properties(${PROJECT_NAME}
PROPERTIES
CXX_STANDARD_REQUIRED YES
CXX_STANDARD 11
AUTOMOC ON
)
target_link_libraries(${PROJECT_NAME}
PUBLIC
Qt::Widgets
)
target_include_directories(${PROJECT_NAME}
PUBLIC
"${PROJECT_SOURCE_DIR}/include"
)
target_sources(${PROJECT_NAME}
PRIVATE
include/QHexView/model/buffer/qdevicebuffer.h
include/QHexView/model/buffer/qhexbuffer.h
include/QHexView/model/buffer/qmappedfilebuffer.h
include/QHexView/model/buffer/qmemorybuffer.h
include/QHexView/model/buffer/qmemoryrefbuffer.h
include/QHexView/model/commands/hexcommand.h
include/QHexView/model/commands/insertcommand.h
include/QHexView/model/commands/removecommand.h
include/QHexView/model/commands/replacecommand.h
include/QHexView/model/commands/replacecommand.h
include/QHexView/model/qhexcursor.h
include/QHexView/model/qhexdelegate.h
include/QHexView/model/qhexdocument.h
include/QHexView/model/qhexmetadata.h
include/QHexView/model/qhexoptions.h
include/QHexView/model/qhexutils.h
include/QHexView/qhexview.h
PRIVATE
src/model/commands/hexcommand.cpp
src/model/commands/insertcommand.cpp
src/model/commands/removecommand.cpp
src/model/commands/replacecommand.cpp
src/model/buffer/qdevicebuffer.cpp
src/model/buffer/qhexbuffer.cpp
src/model/buffer/qmemorybuffer.cpp
src/model/buffer/qmemoryrefbuffer.cpp
src/model/buffer/qmappedfilebuffer.cpp
src/model/qhexdelegate.cpp
src/model/qhexutils.cpp
src/model/qhexcursor.cpp
src/model/qhexmetadata.cpp
src/model/qhexdocument.cpp
src/qhexview.cpp
)
if(QHEXVIEW_ENABLE_DIALOGS)
target_sources(${PROJECT_NAME}
PRIVATE
include/QHexView/dialogs/hexfinddialog.h
src/dialogs/hexfinddialog.cpp
)
target_compile_definitions(${PROJECT_NAME}
PUBLIC
QHEXVIEW_ENABLE_DIALOGS
)
endif()
if(QHEXVIEW_BUILD_EXAMPLE)
add_subdirectory(example)
endif()