Salome HOME
Merge Qt5 porting.
[modules/geom.git] / src / GEOMGUI / CMakeLists.txt
1 # Copyright (C) 2012-2015  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   ${VTK_INCLUDE_DIRS}
28   ${OMNIORB_INCLUDE_DIR}
29   ${CAS_INCLUDE_DIRS}
30   ${KERNEL_INCLUDE_DIRS}
31   ${GUI_INCLUDE_DIRS}
32   ${PROJECT_BINARY_DIR}/idl
33   ${PROJECT_BINARY_DIR}
34   ${PROJECT_SOURCE_DIR}/src/OBJECT
35   ${PROJECT_SOURCE_DIR}/src/GEOMFiltersSelection
36   ${PROJECT_SOURCE_DIR}/src/Material
37   ${PROJECT_SOURCE_DIR}/src/GEOMClient
38   ${PROJECT_SOURCE_DIR}/src/GEOMImpl
39   ${PROJECT_SOURCE_DIR}/src/GEOMUtils
40   ${CMAKE_CURRENT_SOURCE_DIR}
41   )
42
43 # additional preprocessor / compiler flags
44 ADD_DEFINITIONS(
45   ${CAS_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   ${KERNEL_SALOMELocalTrace}
60   ${KERNEL_SalomeDS}
61   ${KERNEL_SalomeDSClient}
62   ${GUI_SalomeApp}
63   )
64
65 # --- headers ---
66
67 SET(GEOMGUI_HEADERS
68   GeometryGUI.h
69   GeometryGUI_Operations.h
70   GEOMGUI.h
71   GEOMPluginGUI.h
72   GEOM_Displayer.h
73   GEOMGUI_OCCSelector.h
74   GEOMGUI_Selection.h
75   GEOM_GEOMGUI.hxx
76   GEOMGUI_CreationInfoWdg.h
77   GEOMGUI_TextTreeWdg.h
78   GEOMGUI_DimensionProperty.h
79   )
80
81 # header files / to be processed by moc
82 SET(_moc_HEADERS 
83   GEOMGUI_CreationInfoWdg.h
84   GEOMGUI_TextTreeWdg.h
85   GeometryGUI.h
86   )
87
88 # --- resources ---
89
90 # resource files / to be processed by rcc
91 SET(_rcc_RESOURCES GEOMGUI.qrc)
92
93 # resource files / to be processed by lrelease
94 SET(_ts_RESOURCES
95   GEOM_images.ts
96   GEOM_msg_en.ts
97   GEOM_msg_fr.ts
98   GEOM_msg_ja.ts
99 )
100
101 # --- sources ---
102
103 # sources / moc wrappings
104 QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
105
106 # sources / rcc wrappings
107 QT_ADD_RESOURCES(_rcc_SOURCES ${_rcc_RESOURCES})
108
109 SET(GEOMGUI_SOURCES
110   GeometryGUI.cxx
111   GEOMGUI.cxx
112   GEOMPluginGUI.cxx
113   GEOM_Displayer.cxx
114   GEOMGUI_OCCSelector.cxx
115   GEOMGUI_Selection.cxx
116   GEOMGUI_CreationInfoWdg.cxx
117   GEOMGUI_TextTreeWdg.cxx
118   GEOMGUI_DimensionProperty.cxx
119   ${_moc_SOURCES}
120   ${_rcc_SOURCES}
121   )
122
123 # --- rules ---
124
125 ADD_LIBRARY(GEOM ${GEOMGUI_SOURCES})
126 TARGET_LINK_LIBRARIES(GEOM ${_link_LIBRARIES})
127 INSTALL(TARGETS GEOM EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
128
129 INSTALL(FILES ${GEOMGUI_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
130 QT_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_GEOM_INSTALL_RES_DATA}")