Salome HOME
e854b6e3202c916adc7b90e44c97f47a17bd703d
[modules/yacs.git] / src / ydfx_gui / CMakeLists.txt
1 # Copyright (C) 2012-2022  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 INCLUDE(UseQtExt)
21
22 # additional include directories
23 INCLUDE_DIRECTORIES(
24   ${PYTHON_INCLUDE_DIR}
25   ${QT_INCLUDES}
26   ${KERNEL_INCLUDE_DIRS}
27   ${PROJECT_SOURCE_DIR}/src/bases
28   ${PROJECT_SOURCE_DIR}/src/engine
29   ${PROJECT_SOURCE_DIR}/src/runtime
30   ${PROJECT_SOURCE_DIR}/src/yacsloader
31   ${PROJECT_SOURCE_DIR}/src/evalyfx
32   ${OMNIORB_INCLUDE_DIR}
33   ${OMNIORB_ROOT_DIR}/include/omniORB4/internal
34   ${OMNIORBPY_INCLUDE_DIR}
35   )
36
37 # additional preprocessor / compiler flags
38 ADD_DEFINITIONS(
39   ${QT_DEFINITIONS}
40   ${OMNIORB_DEFINITIONS}
41   ${PYTHON_DEFINITIONS})
42
43 IF(SALOME_YACS_USE_KERNEL)
44   INCLUDE_DIRECTORIES(${KERNEL_INCLUDE_DIRS})
45   ADD_DEFINITIONS(${KERNEL_DEFINITIONS})
46   SET(SALOME_LIBS 
47     ${KERNEL_SalomeLifeCycleCORBA}
48     ${KERNEL_SalomeIDLKernel}
49     ${KERNEL_SalomeNS}
50     ${KERNEL_SalomeContainer}
51     ${KERNEL_SALOMEBasics}
52     ${KERNEL_SalomeResourcesManager}
53     ${KERNEL_OpUtil}
54     ${KERNEL_SALOMELocalTrace}
55     ${KERNEL_Registry}
56     ${KERNEL_SalomeNotification}
57     ${KERNEL_ResourcesManager}
58     ${KERNEL_SalomeHDFPersist}
59     ${KERNEL_SalomeGenericObj}
60     )
61 ENDIF(SALOME_YACS_USE_KERNEL)
62
63
64 SET(ydfxwidgets_LIBRARIES
65   YACSevalYFX
66   ${QT_LIBRARIES}
67   ${PYTHON_LIBRARIES}
68   )
69
70 SET(_moc_HEADERS
71   YDFXGUIPortsSelector.hxx
72   YDFXGUIPushButtons.hxx
73   YDFXGUIMain.hxx
74   YDFXGUIWrap.hxx
75   YDFXGUISeqInit.hxx
76   YDFXGUIParametrizer.hxx
77   YDFXGUIHostParametrizer.hxx
78   ResourceWidget.hxx
79   )
80
81 # sources / moc wrappings
82 QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
83
84 SET(ydfxwidgets_HEADERS
85   ydfxwidgetsExport.hxx
86   YDFXGUIHostParametrizer.hxx
87   YDFXGUIMain.hxx
88   YDFXGUIParametrizer.hxx
89   YDFXGUIPortsSelector.hxx
90   YDFXGUIPortsValidator.hxx
91   YDFXGUIPushButtons.hxx
92   YDFXGUIPyThreadSaver.hxx
93   YDFXGUISeqInit.hxx
94   YDFXGUIWrap.hxx
95   ResourceWidget.hxx
96   AbstractResourceModel.hxx
97   YDFXResourceModel.hxx
98   SalomeResourceModel.hxx
99   )
100
101 SET(ydfxwidgets_SOURCES
102   YDFXGUIHostParametrizer.cxx
103   YDFXGUIMain.cxx
104   YDFXGUIParametrizer.cxx
105   YDFXGUIPortsSelector.cxx
106   YDFXGUIPortsValidator.cxx
107   YDFXGUIPushButtons.cxx
108   YDFXGUIPyThreadSaver.cxx
109   YDFXGUISeqInit.cxx
110   YDFXGUIWrap.cxx
111   YDFXResourceModel.cxx
112   ResourceWidget.cxx
113   SalomeResourceModel.cxx
114   AbstractResourceModel.cxx
115   ${_moc_SOURCES}
116   )
117
118 ADD_LIBRARY(ydfxwidgets ${ydfxwidgets_SOURCES})
119 TARGET_LINK_LIBRARIES(ydfxwidgets ${ydfxwidgets_LIBRARIES})
120 ADD_EXECUTABLE(ydfxgui ydfxgui.cxx)
121 TARGET_LINK_LIBRARIES(ydfxgui ydfxwidgets)
122
123 INSTALL(TARGETS ydfxwidgets EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
124 INSTALL(TARGETS ydfxgui DESTINATION ${SALOME_INSTALL_BINS})
125 INSTALL(FILES ${ydfxwidgets_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})