[CMake] Fwd: Fwd: cmake link against Qt4's OpenGL
Bill Hoffman
bill.hoffman at kitware.com
Sat Sep 27 11:11:52 EDT 2008
Linge Bai wrote:
> It is the moc stuff that's causing the problem. After used qmake to
> generate moc_*.cpp files, I was able to use cmake to compile the code.
> But I still have no idea on how to use cmake to compile the code without
> using qmake to generate the moc files first.
>
> The change to my CMakeLists.txt file I made is:
> SET(QT_WRAP_CPP TRUE)
>
See here:
http://www.cmake.org/cmake/help/cmake2.6docs.html#module:FindQt4
Specifically:
There are also some files that need processing by some Qt tools such as
moc and uic. Listed below are macros that may be used to process those
files.
macro QT4_WRAP_CPP(outfiles inputfile ... OPTIONS ...)
create moc code from a list of files containing Qt class with
the Q_OBJECT declaration. Per-direcotry preprocessor definitions
are also added. Options may be given to moc, such as those found
when executing "moc -help".
-Bill
--
Bill Hoffman
Kitware, Inc.
28 Corporate Drive
Clifton Park, NY 12065
bill.hoffman at kitware.com
http://www.kitware.com
518-371-3971 (phone and fax)
More information about the CMake
mailing list