Salome HOME
Copyright update 2021
[modules/geom.git] / src / GEOMGUI / CMakeLists.txt
1 # Copyright (C) 2012-2021  CEA/DEN, EDF R&D, OPEN CASCADE
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(UseQtExt)
21
22 # --- options ---
23
24 # additional include directories
25 INCLUDE_DIRECTORIES(
26   ${PTHREAD_INCLUDE_DIR}
27   ${OMNIORB_INCLUDE_DIR}
28   ${OpenCASCADE_INCLUDE_DIR}
29   ${KERNEL_INCLUDE_DIRS}
30   ${GUI_INCLUDE_DIRS}
31   ${PROJECT_BINARY_DIR}/idl
32   ${PROJECT_BINARY_DIR}
33   ${PROJECT_SOURCE_DIR}/src/OBJECT
34   ${PROJECT_SOURCE_DIR}/src/GEOMFiltersSelection
35   ${PROJECT_SOURCE_DIR}/src/Material
36   ${PROJECT_SOURCE_DIR}/src/GEOMClient
37   ${PROJECT_SOURCE_DIR}/src/GEOMImpl
38   ${PROJECT_SOURCE_DIR}/src/GEOMUtils
39   ${PROJECT_SOURCE_DIR}/src/GEOM_I
40   ${CMAKE_CURRENT_SOURCE_DIR}
41   )
42
43 # additional preprocessor / compiler flags
44 ADD_DEFINITIONS(
45   ${OpenCASCADE_DEFINITIONS}
46   ${OMNIORB_DEFINITIONS}
47   ${QT_DEFINITIONS}
48   ${OPENCV_DEFINITIONS}
49   )
50
51 # libraries to link to
52 SET(_link_LIBRARIES
53   GEOMObject
54   GEOMClient
55   GEOMFiltersSelection
56   Material
57   GEOMImpl
58   GEOMUtils
59   GEOMEngine
60   ${KERNEL_SALOMELocalTrace}
61   ${KERNEL_SalomeDS}
62   ${KERNEL_SalomeDSClient}
63   )
64
65 # --- headers ---
66
67 SET(GEOMGUI_HEADERS
68   GeometryGUI.h
69   GEOMGUI_AnnotationMgr.h
70   GeometryGUI_Operations.h
71   GEOMGUI.h
72   GEOMPluginGUI.h
73   GEOM_Displayer.h
74   GEOMGUI_OCCSelector.h
75   GEOMGUI_Selection.h
76   GEOM_GEOMGUI.hxx
77   GEOMGUI_CreationInfoWdg.h
78   GEOMGUI_TextTreeWdg.h
79   GEOMGUI_TextTreeSelector.h
80   GEOMGUI_DimensionProperty.h
81   GEOMGUI_AnnotationAttrs.h
82   )
83
84 # header files / to be processed by moc
85 SET(_moc_HEADERS 
86   GEOMGUI_AnnotationMgr.h
87   GEOMGUI_CreationInfoWdg.h
88   GEOMGUI_TextTreeWdg.h
89   GEOMGUI_TextTreeSelector.h
90   GeometryGUI.h
91   )
92
93 # --- resources ---
94
95 # resource files / to be processed by rcc
96 SET(_rcc_RESOURCES GEOMGUI.qrc)
97
98 # resource files / to be processed by lrelease
99 SET(_ts_RESOURCES
100   GEOM_images.ts
101   GEOM_msg_en.ts
102   GEOM_msg_fr.ts
103   GEOM_msg_ja.ts
104 )
105
106 # --- sources ---
107
108 # sources / moc wrappings
109 QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
110
111 # sources / rcc wrappings
112 QT_ADD_RESOURCES(_rcc_SOURCES ${_rcc_RESOURCES})
113
114 SET(GEOMGUI_SOURCES
115   GeometryGUI.cxx
116   GEOMGUI_AnnotationMgr.cxx
117   GEOMGUI.cxx
118   GEOMPluginGUI.cxx
119   GEOM_Displayer.cxx
120   GEOMGUI_OCCSelector.cxx
121   GEOMGUI_Selection.cxx
122   GEOMGUI_CreationInfoWdg.cxx
123   GEOMGUI_TextTreeWdg.cxx
124   GEOMGUI_TextTreeSelector.cxx
125   GEOMGUI_DimensionProperty.cxx
126   GEOMGUI_AnnotationAttrs.cxx
127   ${_moc_SOURCES}
128   ${_rcc_SOURCES}
129   )
130
131 # --- rules ---
132
133 ADD_LIBRARY(GEOM ${GEOMGUI_SOURCES})
134 TARGET_LINK_LIBRARIES(GEOM ${_link_LIBRARIES})
135 INSTALL(TARGETS GEOM EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
136
137 INSTALL(FILES ${GEOMGUI_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
138 QT_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_GEOM_INSTALL_RES_DATA}")