Salome HOME
4fa10f1b4d093a432fb1031a200e808254c66085
[plugins/gmshplugin.git] / src / GUI / CMakeLists.txt
1 # Copyright (C) 2012-2015  ALNEOS
2 # Copyright (C) 2016-2023  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   ${GMSH_INCLUDE_DIRS}
36   ${CMAKE_CURRENT_BINARY_DIR}
37   ${PROJECT_BINARY_DIR}/idl
38   ${PROJECT_SOURCE_DIR}/src/GMSHPlugin
39 )
40
41 # additional preprocessor / compiler flags
42 ADD_DEFINITIONS(
43   ${QT_DEFINITIONS}
44   ${OMNIORB_DEFINITIONS}
45   ${OpenCASCADE_DEFINITIONS}
46   ${BOOST_DEFINITIONS}
47 )
48
49 # libraries to link to
50 SET(_link_LIBRARIES
51   ${QT_LIBRARIES}
52   ${KERNEL_SALOMELocalTrace}
53   ${GEOM_GEOM}
54   ${SMESH_SMESH}
55   ${SMESH_PluginUtils}
56   ${SMESH_StdMeshersGUI}
57   ${SMESH_SMESHFiltersSelection}
58   ${GUI_suit}
59   ${GUI_qtx}
60   ${GUI_SalomeApp}
61   ${OpenCASCADE_FoundationClasses_LIBRARIES}
62   SalomeIDLGMSHPLUGIN
63 )
64
65 # --- headers ---
66
67 # header files / to be processed by moc
68 SET(_moc_HEADERS
69   GMSHPluginGUI_HypothesisCreator.h
70 )
71
72 # header files / no moc processed
73 SET(_other_HEADERS
74   GMSHPluginGUI.h
75 )
76
77 SET(GMSHPluginGUI_HEADERS ${_moc_HEADERS} ${_other_HEADERS})
78
79 # --- sources ---
80
81 # sources / moc wrappings
82 QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
83
84 # sources / static
85 SET(_other_SOURCES
86   GMSHPluginGUI.cxx
87   GMSHPluginGUI_HypothesisCreator.cxx
88 )
89
90 # --- resources ---
91
92 # resource files / to be processed by lrelease
93 SET(_ts_RESOURCES
94   GMSHPlugin_images.ts
95   GMSHPlugin_msg_en.ts
96   GMSHPlugin_msg_fr.ts
97 )
98
99 # sources / to compile
100 SET(GMSHPluginGUI_SOURCES ${_other_SOURCES} ${_moc_SOURCES})
101
102 # --- rules ---
103
104 ADD_LIBRARY(GMSHPluginGUI ${GMSHPluginGUI_SOURCES})
105 TARGET_LINK_LIBRARIES(GMSHPluginGUI ${_link_LIBRARIES} )
106 INSTALL(TARGETS GMSHPluginGUI EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
107
108 INSTALL(FILES ${GMSHPluginGUI_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
109 QT_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_GMSHPLUGIN_INSTALL_RES_DATA}")