Salome HOME
Application of the patch of Cedric Aguere branch concerning the internationalization
[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_SUBDIRECTORY(dialogs)
21
22 INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/UseQT4EXT.cmake)
23
24 SET(MEDOPGUI_SOURCES
25   MEDOPFactoryClient.cxx
26   XmedConsoleDriver.cxx
27   WorkspaceController.cxx
28   XmedDataModel.cxx
29   MEDEventListener_i.cxx
30   MEDOPModule.cxx
31   DatasourceController.cxx
32   factory.cxx
33 )
34
35 SET(MEDOPGUI_HEADERS MEDOPModule.hxx MEDEventListener_i.hxx WorkspaceController.hxx DatasourceController.hxx)
36
37 QT4_WRAP_CPP(MEDOPGUI_HEADERS_MOC ${MEDOPGUI_HEADERS})
38
39 INCLUDE_DIRECTORIES(
40   ${OMNIORB_INCLUDE_DIRS}
41   ${CAS_INCLUDE_DIRS}
42   ${BOOST_INCLUDE_DIRS}
43   ${PTHREAD_INCLUDE_DIRS}
44   ${KERNEL_ROOT_DIR}/include/salome
45   ${GUI_ROOT_DIR}/include/salome
46   ${CMAKE_CURRENT_BINARY_DIR}
47   ${CMAKE_CURRENT_SOURCE_DIR}/dialogs
48   ${CMAKE_CURRENT_BINARY_DIR}/dialogs
49   ${CMAKE_CURRENT_SOURCE_DIR}/../cmp
50   ${CMAKE_CURRENT_SOURCE_DIR}/../../MEDGUI
51   ${CMAKE_BINARY_DIR}/idl
52   ${CMAKE_BINARY_DIR}
53 )
54
55 SET(MEDOPGUITS_SOURCES
56   MED_images.ts
57   MED_msg_en.ts
58   MED_msg_fr.ts
59 )
60 SET(COMMON_DEFINITIONS "${MED3_DEFINITIONS} ${XDR_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${PLATFORM_DEFINITIONS} ${OMNIORB_DEFINITIONS}")
61 SET(COMMON_FLAGS
62   ${CAS_KERNEL}
63   ${QT_MT_LIBS}
64   ${OMNIORB_LIBS}
65   ${PLATFORM_LIBS}
66   ${BOOST_LIBS}
67   SalomeIDLMED
68   MEDOPGUI_dialogs
69   MEDOPFactoryEngine
70   ${qtx}
71   ${suit}
72   ${SalomeObject}
73   ${SalomeLifeCycleCORBA}
74   ${SalomeKernelHelpers}
75   ${SalomeApp}
76   ${SalomeGuiHelpers}
77   ${SalomeTreeData}
78   ${OpUtil}
79   ${CAM}
80   ${LightApp}
81   ${PyConsole}
82   ${SalomeGuiHelpers}
83 )
84
85 #-D__WITH_MEDMEMGUI__ libMEDGUI.la
86 IF(WITH_MEDMEMGUI)
87   SET(COMMON_DEFINITIONS "${COMMON_DEFINITIONS} -D__WITH_MEDMEMGUI__")
88   SET(COMMON_FLAGS ${COMMON_FLAGS} MEDGUI)
89 ENDIF(WITH_MEDMEMGUI)
90
91 ADD_LIBRARY(MEDOPGUI SHARED ${MEDOPGUI_SOURCES} ${MEDOPGUI_HEADERS_MOC})
92 SET_TARGET_PROPERTIES(MEDOPGUI PROPERTIES COMPILE_FLAGS ${COMMON_DEFINITIONS})
93 TARGET_LINK_LIBRARIES(MEDOPGUI ${COMMON_FLAGS})
94
95 INSTALL(TARGETS MEDOPGUI DESTINATION ${MED_salomelib_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 ${MED_salomeinclude_HEADERS})