-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
100 lines (77 loc) · 2.66 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
92
93
94
95
96
97
98
99
cmake_minimum_required (VERSION 3.8)
project ("Platinum_Eyes")
set(CMAKE_CXX_STANDARD 17)
set(SERVER_SCRIPT ${CMAKE_SOURCE_DIR}/ocrserver.py)
set(SERVER_SCRIPT_DESTINATION ${CMAKE_BINARY_DIR}/ocrserver.py)
set(TESSERACT_TRAINING_ENG ${CMAKE_SOURCE_DIR}/eng_fast.traineddata)
set(TESSERACT_TRAINING_ENG_DESTINATION ${CMAKE_BINARY_DIR}/eng_fast.traineddata)
set(FONT ${CMAKE_SOURCE_DIR}/fonts/Lexend-Regular.ttf)
set(FONT_DESTINATION ${CMAKE_BINARY_DIR}/fonts/Lexend-Regular.ttf)
set(OpenCV_DIR "${VCPKG_INSTALLED_DIR}/x64-windows/share/opencv4")
find_package(Tesseract CONFIG REQUIRED)
find_package(cpr CONFIG REQUIRED)
find_package(nlohmann_json CONFIG REQUIRED)
find_package(SFML COMPONENTS system window graphics CONFIG REQUIRED)
find_package(imgui CONFIG REQUIRED)
find_package(ImGui-SFML CONFIG REQUIRED)
find_package(lodepng CONFIG REQUIRED)
find_package(OpenCV REQUIRED)
set(LIBRARIES
cpr::cpr
sfml-system
sfml-network
sfml-graphics
sfml-window
imgui::imgui
ImGui-SFML::ImGui-SFML
Dwmapi.lib
Tesseract::libtesseract
lodepng
${OpenCV_LIBS}
)
add_executable (
${PROJECT_NAME}
"main.cpp"
"platinumEyes.h"
"modules/utilities/functions.cpp"
"modules/utilities/trim.cpp"
"modules/gui/guiUtilities.cpp"
"modules/keybindings/keyBindings.cpp"
"modules/config/configUtilities.cpp"
"modules/ocr/readingItems.cpp"
"modules/gui/settingsMenu.cpp"
"modules/ocr/tesseract.cpp"
"modules/ocr/easyocr.cpp"
"modules/ocr/ocrfunctions.cpp"
"modules/gui/settingsChanges.cpp"
"modules/gui/settingsChanged.h"
"modules/relics/relicDatabase.cpp"
"modules/ocr/ocr.h"
"modules/config/config.h"
"modules/utilities/utilities.h"
"modules/gui/gui.h"
"modules/keybindings/keybindings.h"
"modules/relics/relics.h")
target_link_libraries(${PROJECT_NAME} PRIVATE ${LIBRARIES})
add_custom_command(
TARGET ${PROJECT_NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
${SERVER_SCRIPT} ${SERVER_SCRIPT_DESTINATION}
COMMENT "Copying server.py to the output directory"
)
add_custom_command(
TARGET ${PROJECT_NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
${TESSERACT_TRAINING_ENG} ${TESSERACT_TRAINING_ENG_DESTINATION}
COMMENT "Copying training data to the output directory"
)
add_custom_command(
TARGET ${PROJECT_NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
${FONT} ${FONT_DESTINATION}
COMMENT "Copying font to the font directory"
)
if (CMAKE_VERSION VERSION_GREATER 3.12)
set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 20)
endif()