Salome HOME
1f4ff9503333481c05bf34e79b3946528eb2cbf1
[modules/gui.git] / adm_local / cmake_files / FindSIPPYQT.cmake
1 #  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
2 #
3 #  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 #  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 #
6 #  This library is free software; you can redistribute it and/or
7 #  modify it under the terms of the GNU Lesser General Public
8 #  License as published by the Free Software Foundation; either
9 #  version 2.1 of the License.
10 #
11 #  This library is distributed in the hope that it will be useful,
12 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
13 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 #  Lesser General Public License for more details.
15 #
16 #  You should have received a copy of the GNU Lesser General Public
17 #  License along with this library; if not, write to the Free Software
18 #  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 #
20 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 #
22
23 FIND_PROGRAM(SIP_EXECUTABLE sip)
24
25 SET(SIP_ROOT ${SIP_EXECUTABLE})
26 IF(SIP_ROOT)
27 GET_FILENAME_COMPONENT(SIP_ROOT ${SIP_ROOT} PATH)
28 GET_FILENAME_COMPONENT(SIP_ROOT ${SIP_ROOT} PATH)
29 ENDIF(SIP_ROOT)
30
31 SET(SIP_INCLUDES -I${SIP_ROOT}/include/python${PYTHON_VERSION})
32
33 FIND_PROGRAM(PYUIC_EXECUTABLE pyuic4)
34
35 SET(PYUIC_ROOT ${PYUIC_EXECUTABLE})
36 IF(PYUIC_ROOT)
37 GET_FILENAME_COMPONENT(PYUIC_ROOT ${PYUIC_ROOT} PATH)
38 GET_FILENAME_COMPONENT(PYUIC_ROOT ${PYUIC_ROOT} PATH)
39 ENDIF(PYUIC_ROOT)
40
41 IF(WINDOWS)
42   SET(PYQT_SIPS ${PYUIC_ROOT}/sip)
43 ELSE(WINDOWS)
44   SET(PYQT_SIPS ${PYUIC_ROOT}/share/sip)
45 ENDIF(WINDOWS)
46
47 SET(PYQT_INCLUDES -I${PYQT_SIPS})
48 SET(PYQT_INCLUDES ${PYQT_INCLUDES} -I${PYQT_SIPS}/QtCore -I${PYQT_SIPS}/QtGui)
49 SET(PYQT_INCLUDES ${PYQT_INCLUDES} -I${PYQT_SIPS}/QtXml -I${PYQT_SIPS}/QtOpenGL)
50 SET(PYQT_INCLUDES ${PYQT_INCLUDES} -I${PYQT_SIPS}/QtAssistant -I${PYQT_SIPS}/QtDesigner)
51 SET(PYQT_INCLUDES ${PYQT_INCLUDES} -I${PYQT_SIPS}/QtNetwork -I${PYQT_SIPS}/QtSql)
52 SET(PYQT_INCLUDES ${PYQT_INCLUDES} -I${PYQT_SIPS}/QtSvg -I${PYQT_SIPS}/QtTest)
53
54 SET(PYQT_SIPFLAGS -x VendorID -x PyQt_NoPrintRangeBug -t WS_X11 -t Qt_4_4_1 -g -s .cc -c .)
55 SET(PYQT_SIPFLAGS ${PYQT_SIPFLAGS} ${PYQT_INCLUDES})