[glideplan_swproj] Re: [glideplan_swproj] Re: CMake

  • From: Tomáš Zámečník <pulcik@xxxxxxxx>
  • To: glideplan_swproj@xxxxxxxxxxxxx
  • Date: Sun, 01 Jan 2012 16:27:52 +0100 (CET)

Hi Kuba!
1)
I removed the build directory, run cmake, build application in VS.
Some functions were missing (linker errors) ...I added osgGA library
to required set of libraries in cmakelists and now it works well.
How do you know, that this subset of osg libraries is the right one?
...did you search the library dependencies?

2)
When I commented out these lines in the cmakelists (the commit with wall flag)

#INCLUDE(CheckCXXCompilerFlag)
#CHECK_CXX_COMPILER_FLAG(-Wall HAS_WALL)
#IF(HAS_WALL)
#  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
#ENDIF(HAS_WALL)

warning disappeared and everything builds well.
Why are these lines in cmakelists?
If it is for "Enable compiler warnings on linux" as you mentioned in commit,
there should be statement:
IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
...I'm going to add it now...please test it, if it works on linux.

Tom

> ------------ Původní zpráva ------------
> Od: Kuba Marek <blue.cube@xxxxxxxxx>
> Předmět: [glideplan_swproj] Re: CMake
> Datum: 01.1.2012 14:06:01
> ----------------------------------------
> Just one more thing to be sure the package detection is working ... try
> it once more with clean cache if you already didn't (delete
> build/CMakeCache.txt or the whole build/ directory)
>
> The warnings probably appeared because I added -Wall compiler flag.
> For me it added a lot of warnings from osg includes, but on gcc these
> were silenced by specifying include paths as system.
> (
> https://github.com/updraft/updraft/commit/e3afe9fcd8bc6f29952d17b6ff35bdde70e8687e#L1R68
> )
>
> ... and yes, every plugin must inherit from QObject for the
> QPluginLoader to work.
>
> K
>
> > Thank you for hint, Kuba.
> > I only set the two mentioned variables in CMake and it works...looks
> > very nice.
> >
> > Now I encounter another 2 problems:
> > 1)
> > There are thousands of compiler warnings from Qt files.
> > It seems that these warnings are only thrown when compiling moc files.
> >
> > Is it possible that it has something to do with Cestmir's commit?
> >
> https://github.com/updraft/updraft/commit/5be96d907e1cd78aeb11e3ba5c8b771b4131ffe7
> >
> > There are lot moc files...is it necessary for each plugin to inherit
> > QObject?
> >
> > 2)
> > I'm also unable to run the application...it fails in function
> > osgEarth::MapNode::findMapNode even when the passed argument seems to
> > be valid (not null).
> >
> > ...Is anybody able to run the last version on Windows? And compile it
> > without all the warnings?
> >
> > Tom
> >
> > > ------------ Původní zpráva ------------
> > > Od: Kuba Marek <blue.cube@xxxxxxxxx>
> > > Předmět: [glideplan_swproj] Re: CMake
> > > Datum: 31.12.2011 15:23:55
> > > ----------------------------------------
> > > Hi,
> > > I already wrote about searching for OSG and OSGEarth two or three
> > > mails ago.
> > > There's no need to set up all of the paths that you see in
> > > the cmake gui, all of them are filled automatically from the
> > > variables OSG_DIR and OSGEARTH_DIR. It should work exactly the same
> > > way that as Qt does. I'm not sure if include dirs are handled in
> > > any way (I didn't write anything for that, but maybe it's handled
> > > by some cmake internal magic). It needs testing on windows and mac,
> > > that's why I didn't close the issue.
> > >
> > > K
> > >
> > > > Hi Cestmir and Kuba,
> > > > I see you have already changed the CMakeLists.txt, please write a
> > > > short e-mail, describing how to properly configure it and what has
> > > > been changed.
> > > >
> > > > Is there some automatical searching of osg and osgEarth libraries
> > > > implemented? Why are there so many variables to set? - I mean for
> > > > example osgutil_include_dir, osgdb_include_dir and other osg dirs,
> > > > while there could be, and almost sure is, only one include dir for
> > > > all osg libs.
> > > >
> > > > It's not comfortable to set so many paths...is it possible to have
> > > > only 6 following variables: osg(debug+release), osg
> > > > dependencies(debug+release) and osgEarth(debug+release) ? ...I
> > > > think that rest paths are relative to these ones.
> > > >
> > > > Tom
> > > >
> > > > To visit archive or unsubscribe, follow:
> > > > http://www.freelists.org/list/glideplan_swproj
> > >
> > >
> > >
> >
> > To visit archive or unsubscribe, follow:
> > http://www.freelists.org/list/glideplan_swproj
>
>
>

To visit archive or unsubscribe, follow:
http://www.freelists.org/list/glideplan_swproj

Other related posts: