Salome HOME
OpenCASCADE Cmake configuration
[plugins/gmshplugin.git] / src / GUI / CMakeLists.txt
1 # Copyright (C) 2012-2015  ALNEOS
2 # Copyright (C) 2016  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.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #
20
21 INCLUDE(UseQtExt)
22
23 # --- options ---
24 # additional include directories
25 INCLUDE_DIRECTORIES(
26   ${QT_INCLUDES}
27   ${OpenCASCADE_INCLUDE_DIR}
28   ${KERNEL_INCLUDE_DIRS}
29   ${GUI_INCLUDE_DIRS}
30   ${GEOM_INCLUDE_DIRS}
31   ${SMESH_INCLUDE_DIRS}
32   ${Boost_INCLUDE_DIRS}
33   ${OMNIORB_INCLUDE_DIR}
34   ${CMAKE_CURRENT_BINARY_DIR}
35   ${PROJECT_BINARY_DIR}/idl
36   ${PROJECT_SOURCE_DIR}/src/GMSHPlugin
37 )
38
39 # additional preprocessor / compiler flags
40 ADD_DEFINITIONS(
41   ${QT_DEFINITIONS}
42   ${OMNIORB_DEFINITIONS}
43   ${OpenCASCADE_DEFINITIONS}
44   ${BOOST_DEFINITIONS}
45 )
46
47 # libraries to link to
48 SET(_link_LIBRARIES
49   ${QT_LIBRARIES}
50   ${KERNEL_SALOMELocalTrace}
51   ${GEOM_GEOM}
52   ${SMESH_SMESH}
53   ${SMESH_PluginUtils}
54   ${SMESH_StdMeshersGUI}
55   ${SMESH_SMESHFiltersSelection}
56   ${GUI_suit}
57   ${GUI_qtx}
58   ${GUI_SalomeApp}
59   ${OpenCASCADE_FoundationClasses_LIBRARIES}
60   SalomeIDLGMSHPLUGIN
61 )
62
63 # --- headers ---
64
65 # header files / to be processed by moc
66 SET(_moc_HEADERS
67   GMSHPluginGUI_HypothesisCreator.h
68 )
69
70 # header files / no moc processed
71 SET(_other_HEADERS
72   GMSHPluginGUI.h
73 )
74
75 SET(GMSHPluginGUI_HEADERS ${_moc_HEADERS} ${_other_HEADERS})
76
77 # --- sources ---
78
79 # sources / moc wrappings
80 QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
81
82 # sources / static
83 SET(_other_SOURCES
84   GMSHPluginGUI.cxx
85   GMSHPluginGUI_HypothesisCreator.cxx
86 )
87
88 # --- resources ---
89
90 # resource files / to be processed by lrelease
91 SET(_ts_RESOURCES
92   GMSHPlugin_images.ts
93   GMSHPlugin_msg_en.ts
94   GMSHPlugin_msg_fr.ts
95 )
96
97 # sources / to compile
98 SET(GMSHPluginGUI_SOURCES ${_other_SOURCES} ${_moc_SOURCES})
99
100 # --- rules ---
101
102 ADD_LIBRARY(GMSHPluginGUI ${GMSHPluginGUI_SOURCES})
103 TARGET_LINK_LIBRARIES(GMSHPluginGUI ${_link_LIBRARIES} )
104 INSTALL(TARGETS GMSHPluginGUI EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
105
106 INSTALL(FILES ${GMSHPluginGUI_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
107 QT_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_GMSHPLUGIN_INSTALL_RES_DATA}")