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