Salome HOME
43faacf4d173574ad41ff21b740fc2fef289fcc6
[modules/med.git] / src / MEDOP / gui / CMakeLists.txt
1 # Copyright (C) 2012-2015  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 ADD_DEFINITIONS(${MEDFILE_DEFINITIONS} ${XDR_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${OMNIORB_DEFINITIONS})
21 INCLUDE(${QT_USE_FILE})
22 SET(QT_LIBS "${QT_LIBRARIES}")
23 INCLUDE(UseQt4Ext)
24
25 ADD_SUBDIRECTORY(dialogs)
26
27
28 SET(MEDOPGUI_SOURCES
29   MEDOPFactoryClient.cxx
30   XmedConsoleDriver.cxx
31   WorkspaceController.cxx
32   XmedDataModel.cxx
33   MEDEventListener_i.cxx
34   MEDOPModule.cxx
35   DatasourceController.cxx
36   factory.cxx
37 )
38
39 SET(MEDOPGUI_HEADERS MEDOPModule.hxx MEDEventListener_i.hxx WorkspaceController.hxx DatasourceController.hxx)
40
41 QT4_WRAP_CPP(MEDOPGUI_HEADERS_MOC ${MEDOPGUI_HEADERS})
42
43 INCLUDE_DIRECTORIES(
44   ${OMNIORB_INCLUDE_DIR} ${OMNIORB_INCLUDE_DIRS}
45   ${CAS_INCLUDE_DIRS}
46   ${Boost_INCLUDE_DIRS}
47   ${PTHREAD_INCLUDE_DIR}
48   ${GUI_INCLUDE_DIRS}
49   ${CMAKE_CURRENT_BINARY_DIR}
50   ${CMAKE_CURRENT_SOURCE_DIR}/dialogs
51   ${CMAKE_CURRENT_BINARY_DIR}/dialogs
52   ${CMAKE_CURRENT_SOURCE_DIR}/../cmp
53   ${CMAKE_CURRENT_SOURCE_DIR}/../../MEDGUI
54   ${PROJECT_BINARY_DIR}/idl
55   ${PROJECT_BINARY_DIR}
56 )
57
58 SET(MEDOPGUITS_SOURCES
59   MED_images.ts
60   MED_msg_en.ts
61   MED_msg_fr.ts
62   MED_msg_ja.ts
63   MEDOP_msg_en.ts
64   MEDOP_msg_fr.ts
65   MEDOP_msg_ja.ts
66 )
67
68 SET(COMMON_FLAGS
69   ${CAS_KERNEL}
70   ${QT_MT_LIBRARIES}
71   ${OMNIORB_LIBRARIES}
72   ${PLATFORM_LIBRARIES}
73   ${BOOST_LIBRARIES}
74   SalomeIDLMED
75   MEDOPGUI_dialogs
76   MEDOPFactoryEngine
77   ${GUI_qtx}
78   ${GUI_suit}
79   ${GUI_SalomeObject}
80   ${KERNEL_SalomeLifeCycleCORBA}
81   ${KERNEL_SalomeKernelHelpers}
82   ${GUI_SalomeApp}
83   ${GUI_SalomeGuiHelpers}
84   ${GUI_SalomeTreeData}
85   ${KERNEL_OpUtil}
86   ${GUI_CAM}
87   ${GUI_LightApp}
88   ${GUI_PyConsole}
89 )
90
91 ADD_LIBRARY(MEDOPGUI SHARED ${MEDOPGUI_SOURCES} ${MEDOPGUI_HEADERS_MOC})
92 IF(WITH_MEDMEMGUI)
93   SET_TARGET_PROPERTIES(MEDOPGUI PROPERTIES COMPILE_FLAGS "-D__WITH_MEDMEMGUI__")
94 ENDIF(WITH_MEDMEMGUI)
95 TARGET_LINK_LIBRARIES(MEDOPGUI ${COMMON_FLAGS})
96
97 INSTALL(TARGETS MEDOPGUI DESTINATION ${SALOME_INSTALL_LIBS})
98 QT4_INSTALL_TS_RESOURCES("${MEDOPGUITS_SOURCES}" "${SALOME_MED_INSTALL_RES_DATA}")
99
100 FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
101 INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})