]> SALOME platform Git repositories - plugins/gmshplugin.git/blob - src/GUI/CMakeLists.txt
Salome HOME
34818fa0ed90860efa5ceeed4f6f0bb7ab266221
[plugins/gmshplugin.git] / src / GUI / CMakeLists.txt
1 # Copyright (C) 2012-2015  ALNEOS
2 # Copyright (C) 2016-2020  EDF R&D
3 #
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License, or (at your option) any later version.
8 #
9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 # Lesser General Public License for more details.
13 #
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with this library; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17 #
18 # See http://www.alneos.com/ or email : contact@alneos.fr
19 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #
21
22 INCLUDE(UseQtExt)
23
24 # --- options ---
25 # additional include directories
26 INCLUDE_DIRECTORIES(
27   ${QT_INCLUDES}
28   ${OpenCASCADE_INCLUDE_DIR}
29   ${KERNEL_INCLUDE_DIRS}
30   ${GUI_INCLUDE_DIRS}
31   ${GEOM_INCLUDE_DIRS}
32   ${SMESH_INCLUDE_DIRS}
33   ${Boost_INCLUDE_DIRS}
34   ${OMNIORB_INCLUDE_DIR}
35   ${CMAKE_CURRENT_BINARY_DIR}
36   ${PROJECT_BINARY_DIR}/idl
37   ${PROJECT_SOURCE_DIR}/src/GMSHPlugin
38 )
39
40 # additional preprocessor / compiler flags
41 ADD_DEFINITIONS(
42   ${QT_DEFINITIONS}
43   ${OMNIORB_DEFINITIONS}
44   ${OpenCASCADE_DEFINITIONS}
45   ${BOOST_DEFINITIONS}
46 )
47
48 # libraries to link to
49 SET(_link_LIBRARIES
50   ${QT_LIBRARIES}
51   ${KERNEL_SALOMELocalTrace}
52   ${GEOM_GEOM}
53   ${SMESH_SMESH}
54   ${SMESH_PluginUtils}
55   ${SMESH_StdMeshersGUI}
56   ${SMESH_SMESHFiltersSelection}
57   ${GUI_suit}
58   ${GUI_qtx}
59   ${GUI_SalomeApp}
60   ${OpenCASCADE_FoundationClasses_LIBRARIES}
61   SalomeIDLGMSHPLUGIN
62 )
63
64 # --- headers ---
65
66 # header files / to be processed by moc
67 SET(_moc_HEADERS
68   GMSHPluginGUI_HypothesisCreator.h
69 )
70
71 # header files / no moc processed
72 SET(_other_HEADERS
73   GMSHPluginGUI.h
74 )
75
76 SET(GMSHPluginGUI_HEADERS ${_moc_HEADERS} ${_other_HEADERS})
77
78 # --- sources ---
79
80 # sources / moc wrappings
81 QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
82
83 # sources / static
84 SET(_other_SOURCES
85   GMSHPluginGUI.cxx
86   GMSHPluginGUI_HypothesisCreator.cxx
87 )
88
89 # --- resources ---
90
91 # resource files / to be processed by lrelease
92 SET(_ts_RESOURCES
93   GMSHPlugin_images.ts
94   GMSHPlugin_msg_en.ts
95   GMSHPlugin_msg_fr.ts
96 )
97
98 # sources / to compile
99 SET(GMSHPluginGUI_SOURCES ${_other_SOURCES} ${_moc_SOURCES})
100
101 # --- rules ---
102
103 ADD_LIBRARY(GMSHPluginGUI ${GMSHPluginGUI_SOURCES})
104 TARGET_LINK_LIBRARIES(GMSHPluginGUI ${_link_LIBRARIES} )
105 INSTALL(TARGETS GMSHPluginGUI EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
106
107 INSTALL(FILES ${GMSHPluginGUI_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
108 QT_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_GMSHPLUGIN_INSTALL_RES_DATA}")