Salome HOME
Copyrights update 2015.
[modules/gui.git] / src / SUIT / 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(UseQt4Ext)
21
22 # --- options ---
23
24 # additional include directories
25 INCLUDE_DIRECTORIES(
26   ${QT_INCLUDES}
27   ${PROJECT_SOURCE_DIR}/src/Qtx
28   ${PROJECT_SOURCE_DIR}/src/ObjBrowser
29 )
30
31 # additional preprocessor / compiler flags
32 ADD_DEFINITIONS(${QT_DEFINITIONS})
33 IF(ENABLE_TESTRECORDER)
34   ADD_DEFINITIONS("-DENABLE_TESTRECORDER ${TESTRECORDER_DEFINITIONS}")
35 ENDIF()
36
37 # libraries to link to
38 SET(_link_LIBRARIES ${PLATFORM_LIBS} ${QT_LIBRARIES} qtx ObjBrowser)
39 IF(ENABLE_TESTRECORDER)
40   LIST(APPEND _link_LIBRARIES ${TESTRECORDER_LIBS})
41 ENDIF()
42
43 # --- headers ---
44
45 # header files / to be processed by moc
46 SET(_moc_HEADERS   
47   SUIT_Accel.h  
48   SUIT_ActionOperation.h 
49   SUIT_Application.h 
50   SUIT_DataBrowser.h 
51   SUIT_DataObject.h 
52   SUIT_Desktop.h 
53   SUIT_FileDlg.h 
54   SUIT_LicenseDlg.h
55   SUIT_MessageBox.h
56   SUIT_Operation.h 
57   SUIT_PopupClient.h 
58   SUIT_PreferenceMgr.h 
59   SUIT_SelectionMgr.h 
60   SUIT_Session.h 
61   SUIT_ShortcutMgr.h
62   SUIT_Study.h
63   SUIT_TreeModel.h 
64   SUIT_ViewManager.h 
65   SUIT_ViewModel.h 
66   SUIT_ViewWindow.h 
67 )
68
69 # header files / no moc processing
70 SET(_other_HEADERS
71   SUIT.h
72   SUIT_CameraProperties.h
73   SUIT_DataObjectIterator.h
74   SUIT_DataObjectKey.h
75   SUIT_DataOwner.h
76   SUIT_ExceptionHandler.h
77   SUIT_FileValidator.h
78   SUIT_OverrideCursor.h
79   SUIT_ResourceMgr.h
80   SUIT_SelectionFilter.h
81   SUIT_Selector.h
82   SUIT_SmartPtr.h
83   SUIT_Tools.h
84   SUIT_TreeSync.h
85 )
86
87 # header files / to install
88 SET(suit_HEADERS ${_moc_HEADERS} ${_other_HEADERS})
89
90 # --- resources ---
91
92 # resource files / to be processed by lrelease
93 SET(_ts_RESOURCES
94   resources/SUIT_msg_en.ts
95   resources/SUIT_msg_fr.ts
96   resources/SUIT_msg_ja.ts
97   resources/SUIT_images.ts
98 )
99
100 # resource files / static
101 SET(_other_RESOURCES
102   resources/icon_visibility_on.png
103   resources/icon_visibility_off.png
104   resources/view_sync.png
105 )
106
107 # --- sources ---
108
109 # sources / moc wrappings
110 QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
111
112 # sources / static
113 SET(_other_SOURCES
114   SUIT_Accel.cxx
115   SUIT_ActionOperation.cxx
116   SUIT_Application.cxx
117   SUIT_CameraProperties.cxx
118   SUIT_DataBrowser.cxx
119   SUIT_DataObject.cxx
120   SUIT_DataObjectIterator.cxx
121   SUIT_DataObjectKey.cxx
122   SUIT_DataOwner.cxx
123   SUIT_Desktop.cxx
124   SUIT_ExceptionHandler.cxx
125   SUIT_FileDlg.cxx
126   SUIT_FileValidator.cxx
127   SUIT_LicenseDlg.cxx
128   SUIT_MessageBox.cxx
129   SUIT_Operation.cxx
130   SUIT_OverrideCursor.cxx
131   SUIT_PopupClient.cxx
132   SUIT_PreferenceMgr.cxx
133   SUIT_ResourceMgr.cxx
134   SUIT_SelectionFilter.cxx
135   SUIT_SelectionMgr.cxx
136   SUIT_Selector.cxx
137   SUIT_Session.cxx
138   SUIT_ShortcutMgr.cxx
139   SUIT_Study.cxx
140   SUIT_Tools.cxx
141   SUIT_TreeModel.cxx
142   SUIT_ViewManager.cxx
143   SUIT_ViewModel.cxx
144   SUIT_ViewWindow.cxx
145 )
146
147 # sources / to compile
148 SET(suit_SOURCES ${_other_SOURCES} ${_moc_SOURCES})
149
150 # --- rules ---
151
152 ADD_LIBRARY(suit ${suit_SOURCES})
153 TARGET_LINK_LIBRARIES(suit ${_link_LIBRARIES})
154 INSTALL(TARGETS suit EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
155
156 INSTALL(FILES ${suit_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
157 QT4_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}")
158
159 INSTALL(FILES ${_other_RESOURCES} DESTINATION ${SALOME_GUI_INSTALL_RES_DATA})
160