[CMake] Fwd: Fwd: Fwd: cmake link against Qt4's OpenGL

2008-09-27 Thread Linge Bai
get.h window.h) QT4_WRAP_CPP(MOCFILES ${MOCHEADER}) ADD_EXECUTABLE(exe main.cpp glwidget.cpp window.cpp ${MOCFILES}) TARGET_LINK_LIBRARIES(exe ${QT_LIBRARIES}) Linge On Sat, Sep 27, 2008 at 11:11 AM, Bill Hoffman <[EMAIL PROTECTED]>wrote: > Linge Bai wrote: > >> It is the moc s

Re: [CMake] Fwd: Fwd: cmake link against Qt4's OpenGL

2008-09-27 Thread Linge Bai
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 mad

[CMake] Fwd: Fwd: cmake link against Qt4's OpenGL

2008-09-26 Thread Linge Bai
eFiles/exe.dir/all] Error 2 >> make: *** [all] Error 2 >> >> >> On Fri, Sep 26, 2008 at 4:59 PM, Michael Jackson < >> [EMAIL PROTECTED]> wrote: >> Set the CMAKE_OSX_SYSROOT to /Developer/SDKs/MacOSX10.5.sdk >> >> and try again. Also, you do actually

[CMake] Fwd: cmake link against Qt4's OpenGL

2008-09-26 Thread Linge Bai
; The link line contains all the proper OpenGL (both apple and Qt) > frameworks. You just need to get past the SDK setting first. > > Mike > > > On Sep 26, 2008, at 4:52 PM, Linge Bai wrote: > > Attached is a screen shot of running ccmake. It's MacOSX10.4u.sdk. And it

[CMake] Fwd: cmake link against Qt4's OpenGL

2008-09-26 Thread Linge Bai
-- Forwarded message -- From: Linge Bai <[EMAIL PROTECTED]> Date: Fri, Sep 26, 2008 at 4:52 PM Subject: Re: [CMake] cmake link against Qt4's OpenGL To: Michael Jackson <[EMAIL PROTECTED]> Attached is a screen shot of running ccmake. It's MacOSX10.4u.s

Re: [CMake] cmake link against Qt4's OpenGL

2008-09-26 Thread Linge Bai
After I used cmake 2.6.1, with CMakeList.txt: PROJECT ( COMBINED ) FIND_PACKAGE (Qt4 REQUIRED) SET(QT_USE_QTOPENGL TRUE) INCLUDE( ${QT_USE_FILE} ) ADD_EXECUTABLE(exe main.cpp glwidget.cpp window.cpp) TARGET_LINK_LIBRARIES(exe ${QT_LIBRARIES}) I am able to link to Qt4's OpenGL, but I have a link er

[CMake] cmake link against Qt4's OpenGL

2008-09-26 Thread Linge Bai
Hi everybody, I have a project developed by Qt4's OpenGL, for example plenty of usage of QGLWidget class. I want to use cmake to compile this project, instead of using qmake, because I need to combine another project to it. I can only link against Qt4 and OpenGL seperately. But I cannot link again