Salome HOME
0d7737beb349073321ee300f47b862979052308d
[modules/gui.git] / src / PyViewer / CMakeLists.txt
1 # Copyright (C) 2015-2021  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 # Author : Maxim GLIBIN, Open CASCADE S.A.S. (maxim.glibin@opencascade.com)
20 #
21
22 INCLUDE(UseQtExt)
23
24 # --- options ---
25
26 # additional include directories
27 INCLUDE_DIRECTORIES(
28   ${QT_INCLUDES}
29   ${PROJECT_SOURCE_DIR}/src/Qtx
30   ${PROJECT_SOURCE_DIR}/src/SUIT
31   ${PROJECT_SOURCE_DIR}/tools/PyEditor/src
32 )
33
34 # additional preprocessor / compiler flags
35 ADD_DEFINITIONS(${QT_DEFINITIONS})
36
37 # libraries to link to
38 SET(_link_LIBRARIES ${PLATFORM_LIBS} ${QT_LIBRARIES} qtx suit PyEditor)
39
40 # --- headers ---
41
42 # header files / to be processed by moc
43 SET(_moc_HEADERS
44   PyViewer_ViewManager.h
45   PyViewer_ViewModel.h
46   PyViewer_ViewWindow.h
47 )
48
49 # header files / no moc processing
50 SET(_other_HEADERS
51   PyViewer.h
52   PyViewer_Settings.h
53 )
54
55 # header files / to install
56 SET(PyViewer_HEADERS ${_moc_HEADERS} ${_other_HEADERS})
57
58 # --- resources ---
59
60 SET(_ts_RESOURCES
61   resources/PyViewer_msg_en.ts
62   resources/PyViewer_msg_fr.ts
63   resources/PyViewer_msg_ja.ts
64   resources/PyViewer_images.ts
65 )
66
67 # resource files / static
68 SET(_other_RESOURCES
69   ${PROJECT_SOURCE_DIR}/tools/PyEditor/src/resources/images/py_copy.png
70   ${PROJECT_SOURCE_DIR}/tools/PyEditor/src/resources/images/py_cut.png
71   ${PROJECT_SOURCE_DIR}/tools/PyEditor/src/resources/images/py_delete.png
72   ${PROJECT_SOURCE_DIR}/tools/PyEditor/src/resources/images/py_find.png
73   ${PROJECT_SOURCE_DIR}/tools/PyEditor/src/resources/images/py_help.png
74   ${PROJECT_SOURCE_DIR}/tools/PyEditor/src/resources/images/py_new.png
75   ${PROJECT_SOURCE_DIR}/tools/PyEditor/src/resources/images/py_open.png
76   ${PROJECT_SOURCE_DIR}/tools/PyEditor/src/resources/images/py_paste.png
77   ${PROJECT_SOURCE_DIR}/tools/PyEditor/src/resources/images/py_preferences.png
78   ${PROJECT_SOURCE_DIR}/tools/PyEditor/src/resources/images/py_redo.png
79   ${PROJECT_SOURCE_DIR}/tools/PyEditor/src/resources/images/py_replace.png
80   ${PROJECT_SOURCE_DIR}/tools/PyEditor/src/resources/images/py_save.png
81   ${PROJECT_SOURCE_DIR}/tools/PyEditor/src/resources/images/py_save_as.png
82   ${PROJECT_SOURCE_DIR}/tools/PyEditor/src/resources/images/py_select_all.png
83   ${PROJECT_SOURCE_DIR}/tools/PyEditor/src/resources/images/py_undo.png
84 )
85
86 # --- sources ---
87
88 # sources / moc wrappings
89 QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
90
91 # sources / static
92 SET(_other_SOURCES
93   PyViewer_Settings.cxx
94   PyViewer_ViewManager.cxx
95   PyViewer_ViewModel.cxx
96   PyViewer_ViewWindow.cxx
97 )
98
99 # sources / to compile
100 SET(PyViewer_SOURCES ${_other_SOURCES} ${_moc_SOURCES})
101
102 # --- rules ---
103
104 ADD_LIBRARY(PyViewer ${PyViewer_SOURCES})
105 TARGET_LINK_LIBRARIES(PyViewer ${_link_LIBRARIES})
106 INSTALL(TARGETS PyViewer EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
107
108 INSTALL(FILES ${PyViewer_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
109 QT_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}")
110 INSTALL(FILES ${_other_RESOURCES} DESTINATION ${SALOME_GUI_INSTALL_RES_DATA})