Salome HOME
Merge branch 'V7_main' of salome:modules/gui.git into V7_main
[modules/gui.git] / src / Plot2d / CMakeLists.txt
1 # Copyright (C) 2012-2014  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   ${QWT_INCLUDE_DIR}
28   ${PROJECT_SOURCE_DIR}/src/Qtx
29   ${PROJECT_SOURCE_DIR}/src/SUIT
30 )
31 IF(SALOME_USE_PYCONSOLE)
32   INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_DIRS})
33 ENDIF()
34
35 # additional preprocessor / compiler flags
36 ADD_DEFINITIONS(${QT_DEFINITIONS} ${QWT_DEFINITIONS} ${PYTHON_DEFINITIONS})
37 IF(SALOME_USE_PYCONSOLE)
38   ADD_DEFINITIONS(${PYTHON_DEFINITIONS})
39 ENDIF()
40
41 # libraries to link to
42 SET(_link_LIBRARIES ${QT_LIBRARIES} ${QWT_LIBRARY} qtx suit)
43 IF(SALOME_USE_PYCONSOLE)
44   LIST(APPEND _link_LIBRARIES ${PYTHON_LIBRARIES})
45 ENDIF()
46
47 # --- headers ---
48
49 # header files / to be processed by moc
50 SET(_moc_HEADERS   
51   Plot2d_Algorithm.h
52   Plot2d_FitDataDlg.h
53   Plot2d_NormalizeAlgorithm.h
54   Plot2d_SetupCurveDlg.h
55   Plot2d_SetupCurveScaleDlg.h
56   Plot2d_SetupViewDlg.h
57   Plot2d_ToolTip.h
58   Plot2d_ViewFrame.h
59   Plot2d_ViewManager.h
60   Plot2d_ViewModel.h
61   Plot2d_ViewWindow.h
62 )
63 IF(SALOME_USE_PYCONSOLE)
64   LIST(APPEND _moc_HEADERS
65     Plot2d_AnalyticalCurveDlg.h
66   )
67 ENDIF()
68
69 # header files / no moc processing
70 SET(_other_HEADERS
71   Plot2d.h
72   Plot2d_Curve.h
73   Plot2d_Histogram.h
74   Plot2d_Object.h
75   Plot2d_PlotItems.h
76   Plot2d_Prs.h
77 )
78 IF(SALOME_USE_PYCONSOLE)
79   LIST(APPEND _other_HEADERS
80     Plot2d_AnalyticalCurve.h
81     Plot2d_AnalyticalParser.h
82   )
83 ENDIF()
84
85 # header files / to install
86 SET(Plot2d_HEADERS ${_moc_HEADERS} ${_other_HEADERS})
87
88 # --- resources ---
89
90 # resource files / to be processed by lrelease
91 SET(_ts_RESOURCES
92   resources/Plot2d_images.ts
93   resources/Plot2d_msg_en.ts
94   resources/Plot2d_msg_fr.ts
95   resources/Plot2d_msg_ja.ts
96 )
97
98 # resource files / static
99 SET(_other_RESOURCES
100   resources/plot2d_analytical_curve.png
101   resources/plot2d_camera_dump.png
102   resources/plot2d_clone.png
103   resources/plot2d_fitall.png
104   resources/plot2d_fitarea.png
105   resources/plot2d_glpan.png
106   resources/plot2d_legend.png
107   resources/plot2d_linear.png
108   resources/plot2d_linear_y.png
109   resources/plot2d_lines.png
110   resources/plot2d_lmax_normalization.png
111   resources/plot2d_lmin_normalization.png
112   resources/plot2d_log.png
113   resources/plot2d_log_y.png
114   resources/plot2d_pan.png
115   resources/plot2d_points.png
116   resources/plot2d_print.png
117   resources/plot2d_rmax_normalization.png
118   resources/plot2d_rmin_normalization.png
119   resources/plot2d_settings.png
120   resources/plot2d_splines.png
121   resources/plot2d_zoom.png
122 )
123
124 # --- sources ---
125
126 # sources / moc wrappings
127 QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
128
129 # sources / static
130 SET(_other_SOURCES
131   Plot2d.cxx
132   Plot2d_Algorithm.cxx
133   Plot2d_Curve.cxx
134   Plot2d_FitDataDlg.cxx
135   Plot2d_Histogram.cxx
136   Plot2d_NormalizeAlgorithm.cxx
137   Plot2d_Object.cxx
138   Plot2d_PlotItems.cxx
139   Plot2d_Prs.cxx
140   Plot2d_SetupCurveDlg.cxx
141   Plot2d_SetupCurveScaleDlg.cxx
142   Plot2d_SetupViewDlg.cxx
143   Plot2d_ToolTip.cxx
144   Plot2d_ViewFrame.cxx
145   Plot2d_ViewManager.cxx
146   Plot2d_ViewModel.cxx
147   Plot2d_ViewWindow.cxx
148 )
149 IF(SALOME_USE_PYCONSOLE)
150   LIST(APPEND _other_SOURCES
151     Plot2d_AnalyticalCurve.cxx
152     Plot2d_AnalyticalCurveDlg.cxx
153     Plot2d_AnalyticalParser.cxx
154   )
155 ENDIF()
156
157 # sources / to compile
158 SET(Plot2d_SOURCES ${_other_SOURCES} ${_moc_SOURCES})
159
160 # --- rules ---
161
162 ADD_LIBRARY(Plot2d ${Plot2d_SOURCES})
163 TARGET_LINK_LIBRARIES(Plot2d ${_link_LIBRARIES})
164 INSTALL(TARGETS Plot2d EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
165
166 INSTALL(FILES ${Plot2d_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
167 QT4_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}")
168
169 INSTALL(FILES ${_other_RESOURCES} DESTINATION ${SALOME_GUI_INSTALL_RES_DATA})