PDA

View Full Version : cmake error



jd
1st August 2008, 14:33
Hi folks,

I'll compiling my application with cmake. I've read some tutorials and the wiki article:
http://wiki.qtcentre.org/index.php?title=Compiling_Qt4_apps_with_CMake

If I tested cmake it brokes down with some errors:


RegularExpression::compile(): Nested *?+.
RegularExpression::compile(): Error in compile.
CMake Error at /usr/share/cmake-2.6/Modules/FindQt4.cmake:1003 (IF):
if had incorrect arguments: CMAKE_CURRENT_BINARY_DIR MATCHES
"${_checkinfile}" (Regular expression "/home/jan/workspace/c++/dummy/src/l"
cannot compile).
Call Stack (most recent call first):
/usr/share/cmake-2.6/Modules/FindQt4.cmake:1076 (QT4_MAKE_OUTPUT_FILE)
CMakeLists.txt:37 (QT4_WRAP_CPP)


RegularExpression::compile(): Nested *?+.
RegularExpression::compile(): Error in compile.
CMake Error at /usr/share/cmake-2.6/Modules/FindQt4.cmake:1003 (IF):
if had incorrect arguments: CMAKE_CURRENT_BINARY_DIR MATCHES
"${_checkinfile}" (Regular expression "/home/jan/workspace/c++/dummy/src/m"
cannot compile).
Call Stack (most recent call first):
/usr/share/cmake-2.6/Modules/FindQt4.cmake:1076 (QT4_MAKE_OUTPUT_FILE)
CMakeLists.txt:37 (QT4_WRAP_CPP)


CMake Error: Attempt to add a custom rule to output "/home/jan/workspace/c++/dummy/build/ui_mainwindow.h.rule" which already has a custom rule.
-- Configuring done


My theorie is, the path is too long...

here is my CMakeLists.txt:


SET( DUMMY_SRCS
./src/main.cpp
./src/logindialog/logindialog.cpp
./src/mainwindow/mainwindow.cpp
)

SET( DUMMY_MOC_HDRS
./src/logindialog/logindialog.h
./src/mainwindow/mainwindow.h
)

SET( DUMMY_UIS
./ui/logindialog.ui
./ui/mainwindow.ui
)

SET( DUMMY_RCS
./images/dummy.qrc
)

ADD_DEFINITIONS( -Wall )

SET( QT_USE_QTSQL TRUE )

FIND_PACKAGE( Qt4 REQUIRED )

INCLUDE( ${QT_USE_FILE} )

QT4_ADD_RESOURCES( DUMMY_RC_SRCS ${DUMMY_RCS} )

QT4_WRAP_UI( DUMMY_UI_HDRS ${DUMMY_UIS} )

QT4_WRAP_CPP( DUMMY_MOC_SRCS ${DUMMY_MOC_HDRS} )


Can someone help me to fix my proplem?

jacek
1st August 2008, 22:36
What happens when you rename that c++ directory to cxx?

jd
2nd August 2008, 08:22
It works finde, thanks.