diff options
Diffstat (limited to 'ConfigureChecks.cmake')
-rw-r--r-- | ConfigureChecks.cmake | 55 |
1 files changed, 51 insertions, 4 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 8cf8d08..f76d691 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -9,6 +9,16 @@ # ################################################# +##### setup architecture flags ################## + +tde_setup_architecture_flags( ) + +include(TestBigEndian) +test_big_endian(WORDS_BIGENDIAN) + +tde_setup_largefiles( ) + + macro( qt_message ) message( STATUS "${ARGN}" ) endmacro( ) @@ -109,10 +119,6 @@ endif( ) qt_message( " UIC_EXECUTABLE: ${UIC_EXECUTABLE}" ) -# definitions -set( QT_DEFINITIONS "-DTQT_NO_ASCII_CAST -DTQT_NO_STL -DTQT_NO_COMPAT -DTQT_NO_TRANSLATION -DTQT_THREAD_SUPPORT -D_REENTRANT" ) - - tde_save( CMAKE_REQUIRED_INCLUDES CMAKE_REQUIRED_LIBRARIES ) set( CMAKE_REQUIRED_INCLUDES ${TQT_INCLUDE_DIR} ) set( CMAKE_REQUIRED_LIBRARIES -L${TQT_LIBRARY_DIR} ${TQT_LIBRARIES} ) @@ -162,3 +168,44 @@ if( NOT HAVE_PATCHED_QT3 ) endif( ) tde_restore( CMAKE_REQUIRED_INCLUDES CMAKE_REQUIRED_LIBRARIES ) + + +##### check for OpenGL + +execute_process( + COMMAND ${PKG_CONFIG_EXECUTABLE} ${TQT_LIBRARIES} --variable=qt_config + OUTPUT_VARIABLE TQT_CONF_VARS + OUTPUT_STRIP_TRAILING_WHITESPACE +) + +MESSAGE(STATUS "List of qt_config variables: ${TQT_CONF_VARS}") + +string( REGEX MATCH " opengl " OPENGL_ENABLED " ${TQT_CONF_VARS} " ) + +if( OPENGL_ENABLED ) + +check_include_file( "OpenGL/glu.h" HAVE_GLU_OPENGL ) +check_include_file( "GL/glu.h" HAVE_GLU_GL ) + +tde_save( CMAKE_REQUIRED_INCLUDES CMAKE_REQUIRED_LIBRARIES ) +set( CMAKE_REQUIRED_INCLUDES ${TQT_INCLUDE_DIR} ) +set( CMAKE_REQUIRED_LIBRARIES -L${TQT_LIBRARY_DIR} ${TQT_LIBRARIES} ) + +check_cxx_source_compiles(" +#include <cstdlib> +#include <ntqgl.h> +int main( int, char** ) +{ + (void) new TQGLWidget( (TQWidget*)0, \"qgl\" ) ; + return EXIT_SUCCESS ; +}" +TQGLWIDGET ) + +tde_restore( CMAKE_REQUIRED_INCLUDES CMAKE_REQUIRED_LIBRARIES ) + +if( ( HAVE_GLU_OPENGL OR HAVE_GLU_GL ) AND TQGLWIDGET ) + set( HAVE_OPENGL 1 ) + else() + tde_message_fatal( "OpenGL has been requested, but neither the OpenGL headers or tqt3 with OpenGL support have been found on your system" ) +endif() +endif( OPENGL_ENABLED ) |