Salome HOME
Revert "Synchronize adm files"
[modules/med.git] / src / MEDOP / gui / CMakeLists.txt
1 # Copyright (C) 2012-2014  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 )
64
65 SET(COMMON_FLAGS
66   ${CAS_KERNEL}
67   ${QT_MT_LIBRARIES}
68   ${OMNIORB_LIBRARIES}
69   ${PLATFORM_LIBRARIES}
70   ${BOOST_LIBRARIES}
71   SalomeIDLMED
72   MEDOPGUI_dialogs
73   MEDOPFactoryEngine
74   ${GUI_qtx}
75   ${GUI_suit}
76   ${GUI_SalomeObject}
77   ${KERNEL_SalomeLifeCycleCORBA}
78   ${KERNEL_SalomeKernelHelpers}
79   ${GUI_SalomeApp}
80   ${GUI_SalomeGuiHelpers}
81   ${GUI_SalomeTreeData}
82   ${KERNEL_OpUtil}
83   ${GUI_CAM}
84   ${GUI_LightApp}
85   ${GUI_PyConsole}
86 )
87
88 ADD_LIBRARY(MEDOPGUI SHARED ${MEDOPGUI_SOURCES} ${MEDOPGUI_HEADERS_MOC})
89 IF(WITH_MEDMEMGUI)
90   SET_TARGET_PROPERTIES(MEDOPGUI PROPERTIES COMPILE_FLAGS "-D__WITH_MEDMEMGUI__")
91 ENDIF(WITH_MEDMEMGUI)
92 TARGET_LINK_LIBRARIES(MEDOPGUI ${COMMON_FLAGS})
93
94 INSTALL(TARGETS MEDOPGUI DESTINATION ${SALOME_INSTALL_LIBS})
95 QT4_INSTALL_TS_RESOURCES("${MEDOPGUITS_SOURCES}" "${SALOME_MED_INSTALL_RES_DATA}")
96
97 FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
98 INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})