Salome HOME
CMake porting
[modules/geom.git] / src / GEOMGUI / CMakeLists.txt
1 # Copyright (C) 2012-2013  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.
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(UseQt4Ext)
21 INCLUDE(${QT_USE_FILE})
22
23 # --- options ---
24
25 # additional include directories
26 INCLUDE_DIRECTORIES(
27   ${QT_INCLUDE_DIRS}
28   ${VTK_INCLUDE_DIRS}
29   ${OMNIORB_INCLUDE_DIR}
30   ${CAS_INCLUDE_DIRS}
31   ${KERNEL_INCLUDE_DIRS}
32   ${GUI_INCLUDE_DIRS}
33   ${PROJECT_BINARY_DIR}/idl
34   ${PROJECT_BINARY_DIR}
35   ${PROJECT_SOURCE_DIR}/src/OBJECT
36   ${PROJECT_SOURCE_DIR}/src/GEOMFiltersSelection
37   ${PROJECT_SOURCE_DIR}/src/Material
38   ${PROJECT_SOURCE_DIR}/src/GEOMClient
39   ${PROJECT_SOURCE_DIR}/src/GEOMImpl
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   )
49
50 # libraries to link to
51 SET(_link_LIBRARIES
52   GEOMObject
53   GEOMClient
54   GEOMFiltersSelection
55   Material
56   GEOMImpl
57   ${KERNEL_SALOMELocalTrace}
58   ${KERNEL_SalomeDS}
59   ${KERNEL_SalomeDSClient}
60   ${GUI_SalomeApp}
61   ${QT_QTXML_LIBRARY}
62   )
63
64 # --- headers ---
65
66 SET(GEOMGUI_HEADERS
67   GeometryGUI.h
68   GeometryGUI_Operations.h
69   GEOMGUI.h
70   GEOMPluginGUI.h
71   GEOMGUI_XmlHandler.h
72   GEOM_Displayer.h
73   GEOMGUI_OCCSelector.h
74   GEOMGUI_Selection.h
75   GEOM_GEOMGUI.hxx
76   GEOMGUI_CreationInfoWdg.h
77   )
78
79 # header files / to be processed by moc
80 SET(_moc_HEADERS 
81   GEOMGUI_CreationInfoWdg.h
82   GeometryGUI.h
83   )
84
85 # --- sources ---
86
87 # sources / moc wrappings
88 QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
89
90 SET(GEOMGUI_SOURCES
91   GeometryGUI.cxx
92   GEOMGUI.cxx
93   GEOMPluginGUI.cxx
94   GEOMGUI_XmlHandler.cxx
95   GEOM_Displayer.cxx
96   GEOMGUI_OCCSelector.cxx
97   GEOMGUI_Selection.cxx
98   GEOMGUI_CreationInfoWdg.cxx
99   ${_moc_SOURCES}
100   )
101
102 # --- resources ---
103
104 # resource files / to be processed by lrelease
105 SET(GEOMGUI_RESOURCES
106   GEOM_images.ts
107   GEOM_msg_en.ts
108   GEOM_msg_fr.ts
109   GEOM_msg_ja.ts
110 )
111
112 # --- rules ---
113
114 ADD_LIBRARY(GEOM ${GEOMGUI_SOURCES})
115 TARGET_LINK_LIBRARIES(GEOM ${_link_LIBRARIES})
116 INSTALL(TARGETS GEOM EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
117
118 INSTALL(FILES ${GEOMGUI_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
119 QT4_INSTALL_TS_RESOURCES("${GEOMGUI_RESOURCES}" "${SALOME_GEOM_INSTALL_RES_DATA}")