-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
73 lines (62 loc) · 1.81 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
cmake_minimum_required(VERSION 3.14)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# add dependency include(cmake/CPM.cmake)
include(cmake/CPM.cmake)
CPMAddPackage(gh:Garen-Wang/[email protected])
project(pie VERSION 0.1 LANGUAGES CXX)
# shl: syntax highlighting language
add_library(
shl
${PROJECT_SOURCE_DIR}/src/shl/parser_builder.cpp
${PROJECT_SOURCE_DIR}/src/shl/presets.cpp
)
target_include_directories(
shl
PUBLIC
${PROJECT_SOURCE_DIR}/include/shl
${PROJECT_SOURCE_DIR}/include/ui
INTERFACE
${PROJECT_SOURCE_DIR}/include
)
target_link_libraries(shl PEGParser::PEGParser Qt5::Core Qt5::Widgets)
find_package(Qt5 COMPONENTS Core Widgets REQUIRED)
set(CMAKE_AUTOMOC ON)
# pierc: configure pie when loading
add_library(
pierc
${PROJECT_SOURCE_DIR}/src/pierc/pierc.cpp
)
target_include_directories(
pierc
PUBLIC
${PROJECT_SOURCE_DIR}/include/ui
${PROJECT_SOURCE_DIR}/include/pierc
${PROJECT_SOURCE_DIR}/include/shl
INTERFACE
${PROJECT_SOURCE_DIR}/include
)
target_link_libraries(pierc PEGParser::PEGParser shl Qt5::Core Qt5::Widgets)
# pie: Pie Is an Editor
qt5_wrap_cpp(window_src ${PROJECT_SOURCE_DIR}/include/ui/window.hpp)
qt5_wrap_cpp(textArea_src ${PROJECT_SOURCE_DIR}/include/ui/textArea.hpp)
add_executable(pie
${PROJECT_SOURCE_DIR}/src/ui/config.cpp
${PROJECT_SOURCE_DIR}/src/ui/rope.cpp
${PROJECT_SOURCE_DIR}/src/ui/actions.cpp
${PROJECT_SOURCE_DIR}/src/ui/modes.cpp
${window_src}
${textArea_src}
${PROJECT_SOURCE_DIR}/src/ui/textArea.cpp
${PROJECT_SOURCE_DIR}/src/ui/window.cpp
${PROJECT_SOURCE_DIR}/src/ui/main.cpp
)
include_directories(
PUBLIC
${PROJECT_SOURCE_DIR}/include/pierc
${PROJECT_SOURCE_DIR}/include/ui
INTERFACE
${PROJECT_SOURCE_DIR}/include
)
target_link_libraries(pie Qt5::Core Qt5::Widgets shl pierc)