]> SALOME platform Git repositories - modules/shaper.git/blob - src/PartSet/CMakeLists.txt
Salome HOME
Merge commit '9b79b986a894aff7ede04c8e43609842e5a9401b'
[modules/shaper.git] / src / PartSet / CMakeLists.txt
1 # Copyright (C) 2014-2023  CEA, EDF
2 #
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Lesser General Public
5 # License as published by the Free Software Foundation; either
6 # version 2.1 of the License, or (at your option) any later version.
7 #
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 # Lesser General Public License for more details.
12 #
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with this library; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 #
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 #
19
20 INCLUDE(Common)
21 INCLUDE(UseQtExt)
22
23 # additional include directories
24 INCLUDE_DIRECTORIES(${QT_INCLUDES})
25
26 # additional preprocessor / compiler flags
27 ADD_DEFINITIONS(${QT_DEFINITIONS} ${OpenCASCADE_DEFINITIONS})
28
29 SET(UPDATE_TRANSLATION OFF)
30
31 SET(PROJECT_HEADERS
32     PartSet.h
33     PartSet_Constants.h
34     PartSet_CustomPrs.h
35     PartSet_ExternalObjectsMgr.h
36     PartSet_FilterInfinite.h
37     PartSet_Filters.h
38     PartSet_IconFactory.h
39     PartSet_MenuMgr.h
40     PartSet_Module.h
41     PartSet_MouseProcessor.h
42     PartSet_OperationPrs.h
43     PartSet_OverconstraintListener.h
44     PartSet_PreviewPlanes.h
45     PartSet_PreviewSketchPlane.h
46     PartSet_ResultSketchPrs.h
47     PartSet_SketcherMgr.h
48     PartSet_SketcherReentrantMgr.h
49     PartSet_Tools.h
50     PartSet_Validators.h
51     PartSet_WidgetEditor.h
52     PartSet_WidgetFeaturePointSelector.h
53     PartSet_WidgetFileSelector.h
54     PartSet_WidgetMultiSelector.h
55     PartSet_WidgetPoint2d.h
56     PartSet_WidgetPoint2DFlyout.h
57     PartSet_WidgetShapeSelector.h
58     PartSet_WidgetSketchCreator.h
59     PartSet_WidgetSketchLabel.h
60     PartSet_CenterPrs.h
61     PartSet_ExternalPointsMgr.h
62     PartSet_TreeNodes.h
63     PartSet_FieldStepPrs.h
64     PartSet_WidgetBSplinePoints.h
65     PartSet_BSplineWidget.h
66 )
67
68 SET(PROJECT_MOC_HEADERS
69
70     PartSet_MenuMgr.h
71     PartSet_Module.h
72     PartSet_SketcherMgr.h
73     PartSet_SketcherReentrantMgr.h
74     PartSet_WidgetEditor.h
75     PartSet_WidgetFeaturePointSelector.h
76     PartSet_WidgetFileSelector.h
77     PartSet_WidgetMultiSelector.h
78     PartSet_WidgetPoint2d.h
79     PartSet_WidgetPoint2DFlyout.h
80     PartSet_WidgetShapeSelector.h
81     PartSet_WidgetSketchCreator.h
82     PartSet_WidgetSketchLabel.h
83     PartSet_WidgetBSplinePoints.h
84     PartSet_ExternalPointsMgr.h
85     PartSet_BSplineWidget.h
86 )
87
88 SET(PROJECT_SOURCES
89     PartSet_CustomPrs.cpp
90     PartSet_ExternalObjectsMgr.cpp
91     PartSet_FilterInfinite.cpp
92     PartSet_Filters.cpp
93     PartSet_IconFactory.cpp
94     PartSet_MenuMgr.cpp
95     PartSet_Module.cpp
96     PartSet_OperationPrs.cpp
97     PartSet_OverconstraintListener.cpp
98     PartSet_PreviewPlanes.cpp
99     PartSet_PreviewSketchPlane.cpp
100     PartSet_ResultSketchPrs.cpp
101     PartSet_SketcherMgr.cpp
102     PartSet_SketcherReentrantMgr.cpp
103     PartSet_Tools.cpp
104     PartSet_Validators.cpp
105     PartSet_WidgetEditor.cpp
106     PartSet_WidgetFeaturePointSelector.cpp
107     PartSet_WidgetFileSelector.cpp
108     PartSet_WidgetMultiSelector.cpp
109     PartSet_WidgetPoint2d.cpp
110     PartSet_WidgetPoint2DFlyout.cpp
111     PartSet_WidgetShapeSelector.cpp
112     PartSet_WidgetSketchCreator.cpp
113     PartSet_WidgetSketchLabel.cpp
114     PartSet_CenterPrs.cpp
115     PartSet_ExternalPointsMgr.cpp
116     PartSet_TreeNodes.cpp
117     PartSet_FieldStepPrs.cpp
118     PartSet_WidgetBSplinePoints.cpp
119     PartSet_BSplineWidget.cpp
120 )
121
122 SET(PROJECT_RESOURCES
123     PartSet_icons.qrc
124 )
125
126 SET(TEXT_RESOURCES
127     PartSet_msg_fr.ts
128 )
129
130 SET(PROJECT_LIBRARIES
131     ModuleBase
132     ModelGeomAlgo
133     Config
134     Locale
135     GeomAPI
136     GeomDataAPI
137     SketcherPrs
138     ${QT_LIBRARIES}
139     ${OpenCASCADE_FoundationClasses_LIBRARIES}
140     ${OpenCASCADE_ApplicationFramework_LIBRARIES}
141     ${OCCViewer}
142 )
143
144 # sources / moc wrappings
145 QT_WRAP_MOC(PROJECT_AUTOMOC ${PROJECT_MOC_HEADERS})
146
147 # sources / rcc wrappings
148 QT_ADD_RESOURCES(PROJECT_COMPILED_RESOURCES ${PROJECT_RESOURCES})
149
150 IF (${UPDATE_TRANSLATION})
151     SET(PROJECT_FILES ${PROJECT_SOURCES} ${PROJECT_HEADERS} )
152     QT5_CREATE_TRANSLATION(QM_RESOURCES
153                            ${PROJECT_FILES}
154                            ${TEXT_RESOURCES}
155                            OPTIONS -extensions cpp -no-recursive -locations none
156                           )
157 ELSE(${UPDATE_TRANSLATION})
158     IF(${MAKE_TRANSLATION})
159         QT5_ADD_TRANSLATION(QM_RESOURCES ${TEXT_RESOURCES})
160     ENDIF(${MAKE_TRANSLATION})
161 ENDIF(${UPDATE_TRANSLATION})
162
163 SOURCE_GROUP ("Generated Files" FILES ${PROJECT_AUTOMOC} ${PROJECT_COMPILED_RESOURCES} ${QM_RESOURCES})
164 SOURCE_GROUP ("Resource Files" FILES ${TEXT_RESOURCES} ${PROJECT_RESOURCES})
165
166 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/XGUI
167                     ${PROJECT_SOURCE_DIR}/src/Config
168                     ${PROJECT_SOURCE_DIR}/src/Events
169                     ${PROJECT_SOURCE_DIR}/src/Locale
170                     ${PROJECT_SOURCE_DIR}/src/ModuleBase
171                     ${PROJECT_SOURCE_DIR}/src/ModelAPI
172                     ${PROJECT_SOURCE_DIR}/src/ModelGeomAlgo
173                     ${PROJECT_SOURCE_DIR}/src/GeomDataAPI
174                     ${PROJECT_SOURCE_DIR}/src/GeomAlgoAPI
175                     ${PROJECT_SOURCE_DIR}/src/SketchPlugin
176                     ${PROJECT_SOURCE_DIR}/src/ExchangePlugin
177                     ${PROJECT_SOURCE_DIR}/src/SketcherPrs
178                     ${PROJECT_SOURCE_DIR}/src/FeaturesPlugin
179                     ${PROJECT_SOURCE_DIR}/src/PartSetPlugin
180                     ${PROJECT_SOURCE_DIR}/src/GeomAPI
181                     ${PROJECT_SOURCE_DIR}/src/CollectionPlugin
182                     ${OpenCASCADE_INCLUDE_DIR}
183                     ${SUIT_INCLUDE}
184 )
185
186 IF(NOT ${HAVE_SALOME})
187   INCLUDE_DIRECTORIES(${APPELEMENTS_INCLUDE_DIR})
188 ENDIF()
189
190 ADD_DEFINITIONS(-DPARTSET_EXPORTS ${OpenCASCADE_DEFINITIONS})
191 ADD_LIBRARY(PartSet SHARED
192     ${PROJECT_SOURCES}
193     ${PROJECT_HEADERS}
194     ${PROJECT_COMPILED_RESOURCES}
195     ${PROJECT_AUTOMOC}
196     ${TEXT_RESOURCES}
197     ${QM_RESOURCES}
198 )
199
200 # The Qt5Widgets_LIBRARIES variable also includes QtGui and QtCore
201 TARGET_LINK_LIBRARIES(PartSet ${PROJECT_LIBRARIES} XGUI ModelAPI GeomAlgoAPI)
202
203 ADD_DEPENDENCIES(PartSet ModuleBase)
204
205 INSTALL(TARGETS PartSet DESTINATION ${SHAPER_INSTALL_BIN})
206 INSTALL(FILES ${QM_RESOURCES} DESTINATION ${SHAPER_INSTALL_QM_RESOURCES})