Salome HOME
41db9e4487681e12524e1ab4670c7edf94720261
[modules/yacs.git] / src / py2yacsgui / CMakeLists.txt
1 # Copyright (C) 2012-2023  CEA, EDF
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   ${QT_INCLUDES}
25   ${PROJECT_SOURCE_DIR}/src/bases
26   ${PROJECT_SOURCE_DIR}/src/engine
27   ${PROJECT_SOURCE_DIR}/src/runtime
28   ${PROJECT_SOURCE_DIR}/src/py2yacs
29   ${PROJECT_BINARY_DIR}/src/py2yacs
30   ${GUI_INCLUDE_DIRS}
31   ${OMNIORB_INCLUDE_DIR}
32   ${OMNIORB_ROOT_DIR}/include/omniORB4/internal
33   ${OMNIORBPY_INCLUDE_DIR}
34   )
35
36 # additional preprocessor / compiler flags
37 ADD_DEFINITIONS(
38   ${QT_DEFINITIONS}
39   ${GUI_DEFINITIONS}
40   ${OMNIORB_DEFINITIONS}
41   ${PYTHON_DEFINITIONS})
42
43 SET(_link_LIBRARIES
44   ${QT_LIBRARIES}
45   ${GUI_LightApp} # for PyEditor
46   py2yacslib
47   )
48
49 SET(_moc_HEADERS
50   Py2YacsDialog.hxx
51   Py2YacsModel.hxx
52   Py2YacsDialog_raw.hxx
53   )
54
55 # sources / moc wrappings
56 QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
57
58 SET(py2yacsgui_HEADERS
59   Py2YacsModel.hxx
60   Py2YacsDialog.hxx
61   config_py2yacsgui.hxx
62   Py2YacsDialog_raw.hxx
63   )
64
65 SET(py2yacsgui_SOURCES
66   Py2YacsDialog.cxx
67   Py2YacsModel.cxx
68   Py2YacsDialog_raw.cxx
69   ${_moc_SOURCES}
70   )
71
72 ADD_LIBRARY(py2yacsguilib ${py2yacsgui_SOURCES})
73 TARGET_LINK_LIBRARIES(py2yacsguilib ${_link_LIBRARIES})
74 ADD_EXECUTABLE(py2yacsgui py2yacsgui.cxx)
75 TARGET_LINK_LIBRARIES(py2yacsgui py2yacsguilib)
76
77 ADD_EXECUTABLE(py2yacsgui_rich py2yacsgui_rich.cxx)
78 TARGET_LINK_LIBRARIES(py2yacsgui_rich py2yacsguilib)
79
80 INSTALL(TARGETS py2yacsguilib EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
81 INSTALL(TARGETS py2yacsgui DESTINATION ${SALOME_INSTALL_BINS})
82 INSTALL(TARGETS py2yacsgui_rich DESTINATION ${SALOME_INSTALL_BINS})
83 INSTALL(FILES ${py2yacsgui_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})