-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathCMakeLists.txt
86 lines (70 loc) · 2.5 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
################################################################################
# This is the CMakeLists file for the:
#
# Ophidian GUI
#
# Its main goals are:
# - Create an graphic user interface.
#
################################################################################
################################################################################
# Set flags
################################################################################
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
################################################################################
# Fetch files
################################################################################
# Fetch .cpp files for executable creation
file(GLOB_RECURSE ophidian_gui_source
"*.cpp"
)
# Fetch .ui files for executable creation
file(GLOB_RECURSE ophidian_gui_userinterface
"*.ui"
)
# Fetch .cpp files for executable creation
file(GLOB_RECURSE ophidian_gui_headers
"*.h"
)
################################################################################
# Uncrustify
################################################################################
set(uncrustify_files ${ophidian_gui_source} ${ophidian_gui_userinterface} ${ophidian_gui_headers})
if(UNCRUSTIFY_IT)
include(uncrustify_helper)
uncrustify_it(${ophidian_uncrustify_config} "${uncrustify_files}")
endif()
if(RUN_UNCRUSTIFY_CHECK)
include(uncrustify_helper)
uncrustify_check(${ophidian_uncrustify_config} "${uncrustify_files}")
endif()
################################################################################
# GUI executable
################################################################################
# Add gui executable
add_executable( ophidian_gui ${ophidian_gui_source} ${ophidian_gui_userinterface} )
# Add executable dependencies
target_link_libraries(ophidian_gui PUBLIC
PRIVATE Qt5::Widgets
PRIVATE SFML::GRAPHICS
PRIVATE SFML::WINDOW
PRIVATE SFML::SYSTEM
PRIVATE ophidian_circuit
PRIVATE ophidian_design
PRIVATE ophidian_entity_system
PRIVATE ophidian_floorplan
PRIVATE ophidian_geometry
PRIVATE ophidian_interconnection
PRIVATE ophidian_parser
PRIVATE ophidian_placement
)
################################################################################
# Installation rules
################################################################################
# Install rule for executable
install(
TARGETS ophidian_gui
DESTINATION ${ophidian_install_bin_dir}
)