[Qgis-developer] QGIS and platforms

Martin Dobias wonder.sk at gmail.com
Thu Feb 1 18:01:33 EST 2007


On 2/1/07, Tom Russo <tom.km5vy at gmail.com> wrote:
> On 2/1/07, Martin Dobias <wonder.sk at gmail.com> wrote:
> > On 2/1/07, Tom Russo <tom.km5vy at gmail.com> wrote:
> > > It may well be that KDE4's CMakeLists.txt file has calls to the
> > > FindThreads package or some similar trick.
> >
> > In FindQt4.cmake module it's already used to search for the threads
> > library for UNIX systems:
> > FIND_PACKAGE(Threads)
> > SET(QT_QTCORE_LIBRARY ${QT_QTCORE_LIBRARY} ${CMAKE_THREAD_LIBS_INIT})
>
> grep Threads /usr/local/share/Modules/FindQt4.cmake shows nothing of
> the sort --- there is no FIND_PACKAGE(Threads) (or FIND_PACKAGE of any
> sort) in my FindQt4.cmake file.

Hmmm, it seems that thread detection has been changed. Here's how it
looks like in CMake 2.4.3 in FindQt4.cmake:

  #######################################
  #
  #       System dependent settings
  #
  #######################################
  # for unix add X11 stuff
  IF(UNIX)
    # on OS X X11 may not be required
    IF (Q_WS_X11)
    FIND_PACKAGE(X11)
    ENDIF (Q_WS_X11)
    FIND_PACKAGE(Threads)
    SET(QT_QTCORE_LIBRARY ${QT_QTCORE_LIBRARY} ${CMAKE_THREAD_LIBS_INIT})
  ENDIF(UNIX)

Newer versions (I've looked into 2.4.6) use qmake's QMAKE_LIBS_THREAD
variable to find this out. Please try this:
- create a file, e.g. x.pro with this content:
message($${QMAKE_LIBS_THREAD})
- run: qmake x.pro
- it should report the threading library which will be use, for me it shows:
Project MESSAGE: -lpthread

Martin



More information about the Qgis-developer mailing list