-
Notifications
You must be signed in to change notification settings - Fork 25
/
CMakeLists.txt
205 lines (185 loc) · 4.64 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
IF(BUILD_GUI)
PYSIDE_WRAP_RC(Ship_QRC_SRCS resources/Ship.qrc)
ENDIF(BUILD_GUI)
SET(ShipMain_SRCS
InitGui.py
ShipGui.py
Instance.py
TankInstance.py
WeightInstance.py
)
SOURCE_GROUP("" FILES ${ShipMain_SRCS})
SET(ShipExamples_SRCS
resources/examples/s60.fcstd
resources/examples/s60_katamaran.fcstd
resources/examples/wigley.fcstd
resources/examples/wigley_katamaran.fcstd
)
SOURCE_GROUP("shipexamples" FILES ${ShipExamples_SRCS})
SET(ShipLoadExample_SRCS
shipLoadExample/__init__.py
shipLoadExample/TaskPanel.py
shipLoadExample/TaskPanel.ui
)
SOURCE_GROUP("shiploadexample" FILES ${ShipLoadExample_SRCS})
SET(ShipCreateShip_SRCS
shipCreateShip/__init__.py
shipCreateShip/Preview.py
shipCreateShip/TaskPanel.py
shipCreateShip/TaskPanel.ui
shipCreateShip/Tools.py
)
SOURCE_GROUP("shipcreateship" FILES ${ShipCreateShip_SRCS})
SET(ShipAreasCurve_SRCS
shipAreasCurve/__init__.py
shipAreasCurve/PlotAux.py
shipAreasCurve/Preview.py
shipAreasCurve/TaskPanel.py
shipAreasCurve/TaskPanel.ui
)
SOURCE_GROUP("shipareascurve" FILES ${ShipAreasCurve_SRCS})
SET(ShipHydrostatics_SRCS
shipHydrostatics/__init__.py
shipHydrostatics/PlotAux.py
shipHydrostatics/TaskPanel.py
shipHydrostatics/TaskPanel.ui
shipHydrostatics/Tools.py
)
SOURCE_GROUP("shiphydrostatics" FILES ${ShipHydrostatics_SRCS})
SET(ShipCreateWeight_SRCS
shipCreateWeight/__init__.py
shipCreateWeight/TaskPanel.py
shipCreateWeight/TaskPanel.ui
shipCreateWeight/Tools.py
)
SOURCE_GROUP("shipcreateweight" FILES ${ShipCreateWeight_SRCS})
SET(ShipCreateTank_SRCS
shipCreateTank/__init__.py
shipCreateTank/TaskPanel.py
shipCreateTank/TaskPanel.ui
shipCreateTank/Tools.py
)
SOURCE_GROUP("shipcreatetank" FILES ${ShipCreateTank_SRCS})
SET(ShipCapacityCurve_SRCS
shipCapacityCurve/__init__.py
shipCapacityCurve/PlotAux.py
shipCapacityCurve/TaskPanel.py
shipCapacityCurve/TaskPanel.ui
shipCapacityCurve/Tools.py
)
SOURCE_GROUP("shipcapacitycurve" FILES ${ShipCapacityCurve_SRCS})
SET(ShipCreateLoadCondition_SRCS
shipCreateLoadCondition/__init__.py
shipCreateLoadCondition/Tools.py
)
SOURCE_GROUP("shipcreateloadcondition" FILES ${ShipCreateLoadCondition_SRCS})
SET(ShipGZ_SRCS
shipGZ/__init__.py
shipGZ/PlotAux.py
shipGZ/TaskPanel.py
shipGZ/TaskPanel.ui
shipGZ/Tools.py
)
SOURCE_GROUP("shipgz" FILES ${ShipGZ_SRCS})
SET(ShipUtils_SRCS
shipUtils/__init__.py
shipUtils/Locale.py
shipUtils/Math.py
shipUtils/Paths.py
shipUtils/Units.py
)
SOURCE_GROUP("shiputils" FILES ${ShipUtils_SRCS})
SET(all_files ${ShipMain_SRCS} ${ShipExamples_SRCS} ${ShipLoadExample_SRCS} ${ShipCreateShip_SRCS} ${ShipAreasCurve_SRCS} ${ShipHydrostatics_SRCS} ${ShipCreateWeight_SRCS} ${ShipCreateTank_SRCS} ${ShipCapacityCurve_SRCS} ${ShipCreateLoadCondition_SRCS} ${ShipGZ_SRCS} ${ShipUtils_SRCS})
SET(ShipGuiIcon_SVG
resources/icons/ShipWorkbench.svg
)
ADD_CUSTOM_TARGET(Ship ALL
SOURCES ${all_files} ${Ship_QRC_SRCS} ${ShipGuiIcon_SVG}
)
fc_copy_sources(Ship "${CMAKE_BINARY_DIR}/Mod/Ship" ${all_files})
fc_copy_sources(Ship "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_DATADIR}/Mod/Ship" ${ShipGuiIcon_SVG})
IF(BUILD_GUI)
fc_target_copy_resource(Ship
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_BINARY_DIR}/Mod/Ship
Ship_rc.py)
ENDIF(BUILD_GUI)
INSTALL(
FILES
${ShipExamples_SRCS}
DESTINATION
Mod/Ship/resources/examples
)
INSTALL(
FILES
${ShipLoadExample_SRCS}
DESTINATION
Mod/Ship/shipLoadExample
)
INSTALL(
FILES
${ShipCreateShip_SRCS}
DESTINATION
Mod/Ship/shipCreateShip
)
INSTALL(
FILES
${ShipAreasCurve_SRCS}
DESTINATION
Mod/Ship/shipAreasCurve
)
INSTALL(
FILES
${ShipHydrostatics_SRCS}
DESTINATION
Mod/Ship/shipHydrostatics
)
INSTALL(
FILES
${ShipCreateWeight_SRCS}
DESTINATION
Mod/Ship/shipCreateWeight
)
INSTALL(
FILES
${ShipCreateTank_SRCS}
DESTINATION
Mod/Ship/shipCreateTank
)
INSTALL(
FILES
${ShipCapacityCurve_SRCS}
DESTINATION
Mod/Ship/shipCapacityCurve
)
INSTALL(
FILES
${ShipCreateLoadCondition_SRCS}
DESTINATION
Mod/Ship/shipCreateLoadCondition
)
INSTALL(
FILES
${ShipGZ_SRCS}
DESTINATION
Mod/Ship/shipGZ
)
INSTALL(
FILES
${ShipUtils_SRCS}
DESTINATION
Mod/Ship/shipUtils
)
INSTALL(
FILES
${ShipMain_SRCS}
${Ship_QRC_SRCS}
DESTINATION
Mod/Ship
)
INSTALL(
FILES
${ShipGuiIcon_SVG}
DESTINATION
"${CMAKE_INSTALL_DATADIR}/Mod/Ship/resources/icons"
)