]> SALOME platform Git repositories - modules/shaper.git/blob - src/SHAPERGUI/CMakeLists.txt
Salome HOME
Remove French translations
[modules/shaper.git] / src / SHAPERGUI / CMakeLists.txt
1 # Copyright (C) 2014-2019  CEA/DEN, EDF R&D
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(UseQtExt)
21
22 # additional include directories
23 INCLUDE_DIRECTORIES(${QT_INCLUDES})
24
25 # additional preprocessor / compiler flags
26 ADD_DEFINITIONS(${QT_DEFINITIONS})
27
28 SET(UPDATE_TRANSLATION OFF)
29
30 SET(PROJECT_HEADERS
31     SHAPER_SHAPERGUI.h
32     SHAPERGUI.h
33     SHAPERGUI_DataModel.h
34     SHAPERGUI_OCCSelector.h
35     SHAPERGUI_SalomeViewer.h
36     SHAPERGUI_NestedButton.h
37     SHAPERGUI_ToolbarsMgr.h
38 )
39
40 SET(PROJECT_MOC_HEADERS
41     SHAPERGUI.h
42     SHAPERGUI_DataModel.h
43     SHAPERGUI_NestedButton.h
44     SHAPERGUI_SalomeViewer.h
45     SHAPERGUI_ToolbarsMgr.h
46 )
47
48 # sources / moc wrappings
49 QT_WRAP_MOC(PROJECT_AUTOMOC ${PROJECT_MOC_HEADERS})
50
51 SET(PROJECT_SOURCES
52     SHAPERGUI.cpp
53     SHAPERGUI_DataModel.cpp
54     SHAPERGUI_OCCSelector.cpp
55     SHAPERGUI_SalomeViewer.cpp
56     SHAPERGUI_NestedButton.cpp
57     SHAPERGUI_ToolbarsMgr.cpp
58 )
59
60 SET(PROJECT_RESOURCES
61     ${CMAKE_CURRENT_BINARY_DIR}/LightApp.xml
62     resources/SalomeApp.xml
63     resources/shaper.png
64 )
65
66 SET(TEXT_RESOURCES
67 #    SHAPERGUI_msg_fr.ts
68 )
69
70 IF (${UPDATE_TRANSLATION})
71     SET(PROJECT_FILES ${PROJECT_SOURCES} ${PROJECT_HEADERS} )
72     QT5_CREATE_TRANSLATION(QM_RESOURCES
73                            ${PROJECT_FILES}
74                            ${TEXT_RESOURCES}
75                            OPTIONS -extensions cpp -no-recursive
76                           )
77 ELSE(${UPDATE_TRANSLATION})
78     QT5_ADD_TRANSLATION(QM_RESOURCES ${TEXT_RESOURCES})
79 ENDIF(${UPDATE_TRANSLATION})
80
81
82 SET(PROJECT_LIBRARIES
83     Events
84     Config
85     XGUI
86     ModuleBase
87     ${QT_LIBRARIES}
88     ${suit}
89     ${std}
90     ${LightApp}
91     ${CAM}
92     ${OCCViewer}
93     ${qtx}
94     ${SalomeObject}
95 )
96
97 ADD_DEFINITIONS( -DSHAPERGUI_EXPORTS ${OpenCASCADE_DEFINITIONS} )
98
99 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/XGUI
100                     ${PROJECT_SOURCE_DIR}/src/Events
101                     ${PROJECT_SOURCE_DIR}/src/ModuleBase
102                     ${PROJECT_SOURCE_DIR}/src/ModelAPI
103                     ${PROJECT_SOURCE_DIR}/src/GeomAPI
104                     ${PROJECT_SOURCE_DIR}/src/Config
105                     ${PROJECT_SOURCE_DIR}/src/ExchangePlugin
106                     ${SALOME_GUI_INCLUDE}
107                     ${SALOME_KERNEL_INCLUDE}
108                     ${OpenCASCADE_INCLUDE_DIR}
109 )
110
111 IF(${HAVE_SALOME})
112   INCLUDE_DIRECTORIES(${SALOME_KERNEL_INCLUDE})
113 ENDIF(${HAVE_SALOME})
114
115 ADD_LIBRARY(SHAPER SHARED
116     ${PROJECT_SOURCES}
117     ${PROJECT_HEADERS}
118     ${PROJECT_AUTOMOC}
119     ${QM_RESOURCES}
120 )
121
122 ADD_DEPENDENCIES(SHAPER XGUI)
123
124 # The Qt5Widgets_LIBRARIES variable also includes QtGui and QtCore
125 TARGET_LINK_LIBRARIES(SHAPER ${PROJECT_LIBRARIES})
126
127 # configuration
128 CONFIGURE_FILE(
129   "${CMAKE_CURRENT_SOURCE_DIR}/resources/LightApp.xml.in"
130   "${CMAKE_CURRENT_BINARY_DIR}/LightApp.xml"
131   )
132
133 INSTALL(TARGETS SHAPER DESTINATION ${SHAPER_INSTALL_BIN})
134 INSTALL(FILES ${PROJECT_RESOURCES} DESTINATION ${SHAPER_INSTALL_RESOURCES})
135 INSTALL(FILES ${QM_RESOURCES} DESTINATION ${SHAPER_INSTALL_QM_RESOURCES})