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   ${OPENCV_DEFINITIONS}
49   )
50
51 # libraries to link to
52 SET(_link_LIBRARIES
53   GEOMObject
54   GEOMClient
55   GEOMFiltersSelection
56   Material
57   GEOMImpl
58   ${KERNEL_SALOMELocalTrace}
59   ${KERNEL_SalomeDS}
60   ${KERNEL_SalomeDSClient}
61   ${GUI_SalomeApp}
62   ${QT_QTXML_LIBRARY}
63   )
64
65 # --- headers ---
66
67 SET(GEOMGUI_HEADERS
68   GeometryGUI.h
69   GeometryGUI_Operations.h
70   GEOMGUI.h
71   GEOMPluginGUI.h
72   GEOMGUI_XmlHandler.h
73   GEOM_Displayer.h
74   GEOMGUI_OCCSelector.h
75   GEOMGUI_Selection.h
76   GEOM_GEOMGUI.hxx
77   GEOMGUI_CreationInfoWdg.h
78   )
79
80 # header files / to be processed by moc
81 SET(_moc_HEADERS 
82   GEOMGUI_CreationInfoWdg.h
83   GeometryGUI.h
84   )
85
86 # --- sources ---
87
88 # sources / moc wrappings
89 QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
90
91 SET(GEOMGUI_SOURCES
92   GeometryGUI.cxx
93   GEOMGUI.cxx
94   GEOMPluginGUI.cxx
95   GEOMGUI_XmlHandler.cxx
96   GEOM_Displayer.cxx
97   GEOMGUI_OCCSelector.cxx
98   GEOMGUI_Selection.cxx
99   GEOMGUI_CreationInfoWdg.cxx
100   ${_moc_SOURCES}
101   )
102
103 # --- resources ---
104
105 # resource files / to be processed by lrelease
106 SET(GEOMGUI_RESOURCES
107   GEOM_images.ts
108   GEOM_msg_en.ts
109   GEOM_msg_fr.ts
110   GEOM_msg_ja.ts
111 )
112
113 # --- rules ---
114
115 ADD_LIBRARY(GEOM ${GEOMGUI_SOURCES})
116 TARGET_LINK_LIBRARIES(GEOM ${_link_LIBRARIES})
117 INSTALL(TARGETS GEOM EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
118
119 INSTALL(FILES ${GEOMGUI_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
120 QT4_INSTALL_TS_RESOURCES("${GEOMGUI_RESOURCES}" "${SALOME_GEOM_INSTALL_RES_DATA}")