Salome HOME
Merge branch 'master' into tlr/playground_optimization
[modules/yacs.git] / src / py2yacsgui / CMakeLists.txt
1 # Copyright (C) 2012-2016  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   ${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   )
32
33 # additional preprocessor / compiler flags
34 ADD_DEFINITIONS(
35   ${QT_DEFINITIONS}
36   ${GUI_DEFINITIONS}
37   ${PYTHON_DEFINITIONS})
38
39 SET(_link_LIBRARIES
40   ${QT_LIBRARIES}
41   ${GUI_LightApp} # for PyEditor
42   py2yacslib
43   )
44
45 SET(_moc_HEADERS
46   Py2YacsDialog.hxx
47   Py2YacsModel.hxx
48   Py2YacsDialog_raw.hxx
49   )
50
51 # sources / moc wrappings
52 QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
53
54 SET(py2yacsgui_HEADERS
55   Py2YacsModel.hxx
56   Py2YacsDialog.hxx
57   config_py2yacsgui.hxx
58   Py2YacsDialog_raw.hxx
59   )
60
61 SET(py2yacsgui_SOURCES
62   Py2YacsDialog.cxx
63   Py2YacsModel.cxx
64   Py2YacsDialog_raw.cxx
65   ${_moc_SOURCES}
66   )
67
68 ADD_LIBRARY(py2yacsguilib ${py2yacsgui_SOURCES})
69 TARGET_LINK_LIBRARIES(py2yacsguilib ${_link_LIBRARIES})
70 ADD_EXECUTABLE(py2yacsgui py2yacsgui.cxx)
71 TARGET_LINK_LIBRARIES(py2yacsgui py2yacsguilib)
72
73 ADD_EXECUTABLE(py2yacsgui_rich py2yacsgui_rich.cxx)
74 TARGET_LINK_LIBRARIES(py2yacsgui_rich py2yacsguilib)
75
76 INSTALL(TARGETS py2yacsguilib EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
77 INSTALL(TARGETS py2yacsgui DESTINATION ${SALOME_INSTALL_BINS})
78 INSTALL(TARGETS py2yacsgui_rich DESTINATION ${SALOME_INSTALL_BINS})
79 INSTALL(FILES ${py2yacsgui_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})