[PyQt] sip/pyqt4/cmake question
luxInteg
lux-integ at btconnect.com
Mon Dec 6 21:05:51 GMT 2010
greetings
I am attempting to compile a test Qt4/PyQt4 project with cmake
The machine used for compiling has these:-
--cpu amd64 2 cores
--o/s linux 64bit cblfs kernel-2.6.32
--gcc-4.4.2,cmake-2.8.0,sip-4.10.2 PyQt4-4.7.1
my cmake/sip instruction is :-
######################
set(SIP_PATH /usr/share/sip/PyQt4 )
find_program(SIP_EXECUTABLE sip)
add_custom_command(OUTPUT
${CMAKE_CURRENT_BINARY_DIR}/fileC.cpp
${CMAKE_CURRENT_BINARY_DIR}/fileD.cpp
COMMAND ${SIP_EXECUTABLE} -c ${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/sipfile.sip
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/sipfile.sip
COMMENT "Processing ${CMAKE_CURRENT_SOURCE_DIR}/sipfile.sip"
VERBATIM)
#####################
my sipfile.sip has these lines
%Import QtGui/QtGuimod.sip
%Import QtCore/QtCoremod.sip
and these
class MdiSubWindow: QMdiSubWindow
{
%TypeHeaderCode
'''
};
Running make after cmake seems to have 'found both QtGuimod.sip and
QtCoremod.sip as the compiler output has this line
----------I----
cd $SOURCES/TestProject/build/profSRC/lib && /usr/bin/sip -c
$SOURCES/TestProject/build/profSRC/lib -I/usr/share/sip/PyQt4
AND this
sip: QMdiSubWindow has not been defined
make[2]: ***
Surmising that it may be failure to find the header file
QtGui/qmdisubwindow.sip I added a line to sipfile.sip
so that its top looks like so:-
%Import QtGui/QtGuimod.sip
%Import QtCore/QtCoremod.sip
%Import QtGui/qmdisubwindow.sip
running cmake and make again then results in
cd $SOURCES/TestProject/build/profSRC/lib && /usr/bin/sip -c
$SOURCES/TestProject/build/profSRC/lib -I/usr/share/sip/PyQt4
AND this
sip: No %Module has been specified for module defined in
$SOURCES/TestProject/profSRC/lib/sipfile.sip
make[2]: ***
help would be appreciated.
luxInteg
More information about the PyQt
mailing list