[CMake] cmake qt4 opengl

2010-12-13 Thread luxInteg
Greetings,

This is towards banishing  my  cmake/qt4 idiocy.


my CMakeLists.txt has these:-


  FIND_PACKAGE( Qt4 REQUIRED )

  set( QT_USE_OPENGL TRUE )
  set( QT_USE_QTSVG  TRUE )
  SET( QT_USE_QTXML TRUE )
  SET( QT_USE_QT3SUPPORT TRUE )
  SET( QT_USE_QTNETWORK  TRUE )
  SET( QT_USE_QTASSISTANT TRUE )
  set( QT_USE_QTASSISTANTCLIENT  TRUE)
  set(QT_USE_QTTEST TRUE )
  set( QT_USE_QTMAIN TRUE)

INCLUDE( ${QT_USE_FILE} )
include_directories(${QT_INCLUDE_DIR})

 ADD_DEFINITIONS( -Wall )
ADD_DEFINITIONS(${QT_DEFINITIONS})
ADD_DEFINITIONS( -D_REENTRANT  )
ADD_DEFINITIONS(-DQT_NO_DEBUG )
ADD_DEFINITIONS(-DQT_SHARED )



I get preprocessors such s these:-

-DQT3_SUPPORT 
-DQT_3SUPPORT_LIB 
-DQT_ASSISTANT_LIB 
-DQT_SCRIPT_LIB 
-DQT_SVG_LIB 
-DQT_GUI_LIB 
-DQT_TEST_LIB 
-DQT_XML_LIB 
-DQT_NETWORK_LIB 
-DQT_CORE_LIB 
-D_REENTRANT 
-DQT_NO_DEBUG 
-DQT_SHARED 

and  includes such as 
-I/opt/qt4/include/Qt3Support  etc but no 
-I/opt/qt4/include/Qt4OpenGL 

even if I add   these 

 FIND_PACKAGE( X11 REQUIRED )
 FIND_PACKAGE( OpenGL REQUIRED )

*with cmake responding as follows:-
--
-- Looking for XOpenDisplay in 
/usr/X11R6/lib64/libX11.so;/usr/X11R6/lib64/libXext.so
-- Looking for XOpenDisplay in 
/usr/X11R6/lib64/libX11.so;/usr/X11R6/lib64/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/X11R6/lib64/libX11.so
found opengl
-

I even added ${OPENGL_INCLUDE_DIR}  to include_directories()  but it  made no 
difference

QUESTIONS:-

---a) Is it necessary to manually   set  ADD_DEFINITIONS( -DQT_OPENGL_LIB  )  
and   add /opt/qt4/include/Qt4OpenGL to include_directories() ?
---b) this file  qplatformdefs.h   
http://qt.gitorious.org/qt/qt/blobs/15f52e00e50784d39bd2ffe8a2924aecbc0ce2cc/mkspecs/unsupported/linux-
clang/qplatformdefs.h
OR
http://www.koders.com/cpp/fid5FE3743846336C984EFBA55350C74C26F8BFB714.aspx

  is  part of qt4 (its in the mkspecs  directory);  Is it necessary to include 
it in a cmake/qt4 project and if so how so?

sincerely
luxInteg
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] cmake qt4 opengl

2010-12-13 Thread Christian Ehrlicher

 Original-Nachricht 
 Datum: Mon, 13 Dec 2010 12:48:23 +
 Von: luxInteg 
 An: cmake@cmake.org
 Betreff: [CMake] cmake qt4  opengl

 Greetings,
 
 This is towards banishing  my  cmake/qt4 idiocy.
 
 
 my CMakeLists.txt has these:-
 
 
   FIND_PACKAGE( Qt4 REQUIRED )
 
   set( QT_USE_OPENGL TRUE )

FindQt4.cmake:
# When using the components argument, QT_USE_QT* variables are automatically set
# for the QT_USE_FILE to pick up.  If one wishes to manually set them, the
# available ones to set include:
#QT_DONT_USE_QTCORE
#QT_DONT_USE_QTGUI
...
#QT_USE_QTOPENGL
#QT_USE_QTSQL

HTH
Christian
-- 
Neu: GMX De-Mail - Einfach wie E-Mail, sicher wie ein Brief!  
Jetzt De-Mail-Adresse reservieren: http://portal.gmx.net/de/go/demail
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake