[CMake] CMake 2.6.2 can't find QtCore
Serhii Piddubchak
serhii.piddubchak at gmail.com
Wed Nov 5 11:36:45 EST 2008
Hello, I'm using OpenSUSE 11.0 and trying to build software that uses QT.
I have QT and QT-devel packages installed but CMake says it Can't find QtCore.
I've posted a question about this to a project's forum here:
http://www.hedgewars.org/forum/viewtopic.php?id=648
They said it could be a CMake bug.
Here is the log(versions of cmake and qt are included):
dusoft at suse-note:~/builds> tar jxf ~/downloads/hedgewars-src-0.9.7.tar.bz2
dusoft at suse-note:~/builds> cd hedgewars-src-0.9.7/
dusoft at suse-note:~/builds/hedgewars-src-0.9.7> cmake .
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Looking for Q_WS_X11
-- Looking for Q_WS_X11 - found
-- Looking for Q_WS_WIN
-- Looking for Q_WS_WIN - not found.
-- Looking for Q_WS_QWS
-- Looking for Q_WS_QWS - not found.
-- Looking for Q_WS_MAC
-- Looking for Q_WS_MAC - not found.
CMake Error at /usr/share/cmake/Modules/FindQt4.cmake:788 (MESSAGE):
Could NOT find QtCore. Check
/home/dusoft/builds/hedgewars-src-0.9.7/CMakeFiles/CMakeError.log for more
details.
Call Stack (most recent call first):
QTfrontend/CMakeLists.txt:11 (find_package)
-- Configuring incomplete, errors occurred!
dusoft at suse-note:~/builds/hedgewars-src-0.9.7> cmake --version
cmake version 2.6-patch 2
dusoft at suse-note:~/builds/hedgewars-src-0.9.7> cat CMakeFiles/CMakeError.log
Determining if the Q_WS_WIN exist failed with the following output:
Change Dir: /home/dusoft/builds/hedgewars-src-0.9.7/CMakeFiles/CMakeTmp
Run Build Command:/usr/bin/gmake "cmTryCompileExec/fast"
/usr/bin/gmake -f CMakeFiles/cmTryCompileExec.dir/build.make
CMakeFiles/cmTryCompileExec.dir/build
gmake[1]: Entering directory
`/home/dusoft/builds/hedgewars-src-0.9.7/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report
/home/dusoft/builds/hedgewars-src-0.9.7/CMakeFiles/CMakeTmp/CMakeFiles
1
Building C object CMakeFiles/cmTryCompileExec.dir/CheckSymbolExists.c.o
/usr/bin/gcc -o
CMakeFiles/cmTryCompileExec.dir/CheckSymbolExists.c.o -c
/home/dusoft/builds/hedgewars-src-0.9.7/CMakeFiles/CMakeTmp/CheckSymbolExists.c
/home/dusoft/builds/hedgewars-src-0.9.7/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
In function 'main':
/home/dusoft/builds/hedgewars-src-0.9.7/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:
error: 'Q_WS_WIN' undeclared (first use in this function)
/home/dusoft/builds/hedgewars-src-0.9.7/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:
error: (Each undeclared identifier is reported only once
/home/dusoft/builds/hedgewars-src-0.9.7/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:
error: for each function it appears in.)
gmake[1]: *** [CMakeFiles/cmTryCompileExec.dir/CheckSymbolExists.c.o] Error 1
gmake[1]: Leaving directory
`/home/dusoft/builds/hedgewars-src-0.9.7/CMakeFiles/CMakeTmp'
gmake: *** [cmTryCompileExec/fast] Error 2
File /home/dusoft/builds/hedgewars-src-0.9.7/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <QtCore/qglobal.h>
void cmakeRequireSymbol(int dummy,...){(void)dummy;}
int main()
{
#ifndef Q_WS_WIN
cmakeRequireSymbol(0,&Q_WS_WIN);
#endif
return 0;
}
Determining if the Q_WS_QWS exist failed with the following output:
Change Dir: /home/dusoft/builds/hedgewars-src-0.9.7/CMakeFiles/CMakeTmp
Run Build Command:/usr/bin/gmake "cmTryCompileExec/fast"
/usr/bin/gmake -f CMakeFiles/cmTryCompileExec.dir/build.make
CMakeFiles/cmTryCompileExec.dir/build
gmake[1]: Entering directory
`/home/dusoft/builds/hedgewars-src-0.9.7/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report
/home/dusoft/builds/hedgewars-src-0.9.7/CMakeFiles/CMakeTmp/CMakeFiles
1
Building C object CMakeFiles/cmTryCompileExec.dir/CheckSymbolExists.c.o
/usr/bin/gcc -o
CMakeFiles/cmTryCompileExec.dir/CheckSymbolExists.c.o -c
/home/dusoft/builds/hedgewars-src-0.9.7/CMakeFiles/CMakeTmp/CheckSymbolExists.c
/home/dusoft/builds/hedgewars-src-0.9.7/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
In function 'main':
/home/dusoft/builds/hedgewars-src-0.9.7/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:
error: 'Q_WS_QWS' undeclared (first use in this function)
/home/dusoft/builds/hedgewars-src-0.9.7/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:
error: (Each undeclared identifier is reported only once
/home/dusoft/builds/hedgewars-src-0.9.7/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:
error: for each function it appears in.)
gmake[1]: *** [CMakeFiles/cmTryCompileExec.dir/CheckSymbolExists.c.o] Error 1
gmake[1]: Leaving directory
`/home/dusoft/builds/hedgewars-src-0.9.7/CMakeFiles/CMakeTmp'
gmake: *** [cmTryCompileExec/fast] Error 2
File /home/dusoft/builds/hedgewars-src-0.9.7/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <QtCore/qglobal.h>
void cmakeRequireSymbol(int dummy,...){(void)dummy;}
int main()
{
#ifndef Q_WS_QWS
cmakeRequireSymbol(0,&Q_WS_QWS);
#endif
return 0;
}
Determining if the Q_WS_MAC exist failed with the following output:
Change Dir: /home/dusoft/builds/hedgewars-src-0.9.7/CMakeFiles/CMakeTmp
Run Build Command:/usr/bin/gmake "cmTryCompileExec/fast"
/usr/bin/gmake -f CMakeFiles/cmTryCompileExec.dir/build.make
CMakeFiles/cmTryCompileExec.dir/build
gmake[1]: Entering directory
`/home/dusoft/builds/hedgewars-src-0.9.7/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report
/home/dusoft/builds/hedgewars-src-0.9.7/CMakeFiles/CMakeTmp/CMakeFiles
1
Building C object CMakeFiles/cmTryCompileExec.dir/CheckSymbolExists.c.o
/usr/bin/gcc -o
CMakeFiles/cmTryCompileExec.dir/CheckSymbolExists.c.o -c
/home/dusoft/builds/hedgewars-src-0.9.7/CMakeFiles/CMakeTmp/CheckSymbolExists.c
/home/dusoft/builds/hedgewars-src-0.9.7/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
In function 'main':
/home/dusoft/builds/hedgewars-src-0.9.7/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:
error: 'Q_WS_MAC' undeclared (first use in this function)
/home/dusoft/builds/hedgewars-src-0.9.7/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:
error: (Each undeclared identifier is reported only once
/home/dusoft/builds/hedgewars-src-0.9.7/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:
error: for each function it appears in.)
gmake[1]: *** [CMakeFiles/cmTryCompileExec.dir/CheckSymbolExists.c.o] Error 1
gmake[1]: Leaving directory
`/home/dusoft/builds/hedgewars-src-0.9.7/CMakeFiles/CMakeTmp'
gmake: *** [cmTryCompileExec/fast] Error 2
File /home/dusoft/builds/hedgewars-src-0.9.7/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <QtCore/qglobal.h>
void cmakeRequireSymbol(int dummy,...){(void)dummy;}
int main()
{
#ifndef Q_WS_MAC
cmakeRequireSymbol(0,&Q_WS_MAC);
#endif
return 0;
}
dusoft at suse-note:~/builds/hedgewars-src-0.9.7> qmake --version
QMake version 2.01a
Using Qt version 4.4.0 in /usr/lib
--
Serhii Piddubchak
Homepage: http://dusoft.eu/
More information about the CMake
mailing list