Don,
Few things you could try if you aren't bored already ;-)
1) man cmake
and search for QT4_WRAP_UI
2) replace the examples/qosgwidget/CMakeLists.txt by the one attached to
this mail
when calling ccmake it will pop up a message telling whether or not QT4 was
found (this could be the problem if cmake finds qt3 and not qt4 as the macro
QT4_WRAP_UI is qt4 specific)
3) if in 2) you get that qt4 was not found you can try to uncomment the
first line of the attached CMakeLists.txt but I don't know if it will help.
I hope we can solve this.
Loïc
PS: I just noticed I was replying to Don only by mistake. So it must be hard
to follow this thread for others. Sorry about that.
On Wed, Jun 17, 2009 at 11:33 PM, Don Leich <[email protected]> wrote:
> Loic,
>
> I've added the new subdirectory under src/examples, edited the
> examples/CMakeLists.txt as directed and the I run ccmake.
> I am building out-of-source which may introduce a problem.
>
> $ # This is the source directory
> $ cd OpenSceneGraph-2.8.1
>
> $ # Go to the out-of-source build direectory
> $ cd ../OpenSceneGraph-2.8.1.build_debug
>
> $ ccmake ../OpenSceneGraph-2.8.1
> c to configure and in no time...
>
> CMake Error at examples/qosgwidget/CMakeLists.txt:3 (QT4_WRAP_UI):
> Unknown CMake command "QT4_WRAP_UI".
>
>
> It's likely that the cmake I'm using was build before Qt was installed.
> I'm starting to think that this is probably the cause of the problem.
>
> -Don
>
>
> Simon Loic wrote:
>
>> Don,
>> Honnestly I have no idea why you get this error. Did you compile the
>> example as part of osg or as a stand alone application? You have to run
>> cmake from the osg build directory. The fact that the name doesn't start
>> with osg doesn't matter as you specify in the OSG/examples/CMakeLists.txt
>> file :
>> ADD_SUBDIRECTORY(qosgwidget)
>> then you just have to compile by calling (from the osg build directory) :
>> make example_qosgwidget
>>
>> Did someone else tried to compile it? Robert?
>> At least it works at my place
>>
>> Loïc
>>
>>
>> On Wed, Jun 17, 2009 at 6:39 PM, Don Leich <[email protected] <mailto:
>> [email protected]>> wrote:
>>
>> Hi Simon,
>>
>> I haven't been able to past this error in ccmake configure...
>>
>> CMake Error at examples/qosgwidget/CMakeLists.txt:3 (QT4_WRAP_UI):
>> Unknown CMake command "QT4_WRAP_UI".
>>
>> I also wonder if there are other compliance issues with placing this in
>> the osg/examples branch as every other example starts with "osg". If
>> you have the time and energy to get this Robert ready, got for it!
>>
>> -Don
>>
>> Simon Loic wrote:
>>
>> Hi Don, any news from you?
>> BTW, aren't there interested users in commenting Don's work. I'm
>> a bit surprised as I've seen recently threads from users
>> expecting better integration of osg in QT applications. Maybe
>> worth posting about it on osg-users ML?
>> Cheers,
>> Loďc
>>
>>
>>
>> On Fri, Jun 5, 2009 at 12:48 AM, Simon Loic
>> <[email protected] <mailto:[email protected]>
>> <mailto:[email protected] <mailto:[email protected]>>>
>> wrote:
>>
>> Don,
>> you're perfectly right, you need to put it i the osg/examples
>> directory and add the directive : ADD_SUBDIRECTORY(qosgwidget)
>> in osg/examples/CMakeLists.txt
>> It is totally possible to write a CMakeLists.txt for a stand
>> alone
>> application (linked against osg libs). But, as Robert seemed
>> to have
>> a preference for the other way around, I sticked with it.
>> Anyway if
>> you want the stand alone version just let me know.
>> friendly,
>> Loďc Simon
>>
>>
>>
>>
>> On Thu, Jun 4, 2009 at 10:31 PM, Don Leich <[email protected]
>> <mailto:[email protected]>
>> <mailto:[email protected] <mailto:[email protected]>>> wrote:
>>
>> Hmmm. I had someone with both OSG and cmake expertise
>> look at
>> the qosgwidget
>> submission and determine that there were large pieces
>> missing in
>> the cmake
>> infrastructure, probably provided by the local environment
>> of
>> the submittor,
>> in this case, Simon. Re-reading his email again, does this
>> imply that in order
>> to build this submission it needs to be placed in directory
>> under OSG/examples?
>>
>> -Don
>>
>>
>> >
>> > Hi Robert, Don
>> > here is a corrected version with support of QT via cmake.
>> > To test it, one just need to extract the archive in the
>> OSG/example
>> > directory and add one line in the
>> OSG/examples/CMakeLists.txt
>> file :
>> > ADD_SUBDIRECTORY(qosgwidget)
>> > IMHO this example better demonstrates the integration osg
>> with qt than the
>> > existing osgviewerQT as moc is used.
>> > BTW I added a StatsHandler and a ThreadingHandler to
>> demonstrate the
>> > support
>> > of different threading models.
>> > Lo?c Simon
>> >
>> >
>> >
>>
>> _______________________________________________
>> osg-submissions mailing list
>> [email protected]
>> <mailto:[email protected]>
>> <mailto:[email protected]
>> <mailto:[email protected]>>
>>
>>
>> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>>
>>
>>
>>
>>
>>
>
##FIND_PACKAGE(Qt4) #was normally caled in the master CMakeLists.txt
IF(QT4_FOUND)
MESSAGE("QT4 was found")
ELSE(QT4_FOUND)
MESSAGE("QT4 was not found")
IF(QT3_FOUND)
MESSAGE("But QT3 was found")
ELSE(QT3_FOUND)
MESSAGE("QT3 was not found either")
ENDIF(QT3_FOUND)
ENDIF(QT4_FOUND)
#user interface compilation
SET(SOURCES_UI testMainWin.ui testOutboardWin.ui)
QT4_WRAP_UI( SOURCES_UI_H ${SOURCES_UI})
#ressources
#SET(QtApp_RCCS ressources/images/icons.qrc)
#QT4_ADD_RESOURCES(QtApp_RCC_SRCS ${QtApp_RCCS})
# for the macro Q_OBJECT..
SET(SOURCES_H
CompositeViewerQOSG.h
testMainWin.h
testOutboardWin.h)
QT4_WRAP_CPP( SOURCES_H_MOC ${SOURCES_H} )
INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} "./")
SET(TARGET_SRC
${SOURCES_H_MOC}
${SOURCES_UI_H}
QOSGWidget.h
testOutboardWin.cpp
CompositeViewerQOSG.cpp
QOSGWidget.cpp
testMainWin.cpp
main.cpp
)
IF (QT4_FOUND)
SET(TARGET_EXTERNAL_LIBRARIES ${QT_QTCORE_LIBRARY_RELEASE}
${QT_QTGUI_LIBRARY_RELEASE} ${QT_QTOPENGL_LIBRARY_RELEASE} )
ADD_DEFINITIONS(-DUSE_QT4)
ELSE(QT4_FOUND)
SET(TARGET_EXTERNAL_LIBRARIES ${QT_LIBRARIES} )
ENDIF(QT4_FOUND)
INCLUDE_DIRECTORIES(${QT_INCLUDE_DIR} )
#### end var setup ###
SETUP_EXAMPLE(qosgwidget)
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org