|
|
|
@ -48,9 +48,9 @@ endif( )
|
|
|
|
|
|
|
|
|
|
# qt prefix directory
|
|
|
|
|
if( NOT DEFINED QT_PREFIX_DIR )
|
|
|
|
|
if( NOT $ENV{QTDIR} STREQUAL "" AND QT_VERSION STREQUAL "3" )
|
|
|
|
|
set( QT_PREFIX_DIR "$ENV{QTDIR}" )
|
|
|
|
|
qt_message( " QT_PREFIX_DIR is set to QTDIR" )
|
|
|
|
|
if( NOT $ENV{TQTDIR} STREQUAL "" AND QT_VERSION STREQUAL "3" )
|
|
|
|
|
set( QT_PREFIX_DIR "$ENV{TQTDIR}" )
|
|
|
|
|
qt_message( " QT_PREFIX_DIR is set to TQTDIR" )
|
|
|
|
|
else( )
|
|
|
|
|
set( QT_PREFIX_DIR "/usr" )
|
|
|
|
|
endif( )
|
|
|
|
@ -59,21 +59,21 @@ qt_message( " QT_PREFIX_DIR : ${QT_PREFIX_DIR}" )
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# qt headers
|
|
|
|
|
if( NOT DEFINED QT_INCLUDE_DIR )
|
|
|
|
|
if( NOT DEFINED TQT_INCLUDE_DIR )
|
|
|
|
|
if( QT_PREFIX_DIR STREQUAL "/usr" )
|
|
|
|
|
if( EXISTS "${QT_PREFIX_DIR}/include/tqt${QT_VERSION}" )
|
|
|
|
|
set( QT_INCLUDE_DIR "${QT_PREFIX_DIR}/include/tqt${QT_VERSION}" )
|
|
|
|
|
set( TQT_INCLUDE_DIR "${QT_PREFIX_DIR}/include/tqt${QT_VERSION}" )
|
|
|
|
|
else( )
|
|
|
|
|
set( QT_INCLUDE_DIR "${QT_PREFIX_DIR}/include/qt${QT_VERSION}" )
|
|
|
|
|
set( TQT_INCLUDE_DIR "${QT_PREFIX_DIR}/include/qt${QT_VERSION}" )
|
|
|
|
|
endif( )
|
|
|
|
|
else( )
|
|
|
|
|
set( QT_INCLUDE_DIR "${QT_PREFIX_DIR}/include" )
|
|
|
|
|
set( TQT_INCLUDE_DIR "${QT_PREFIX_DIR}/include" )
|
|
|
|
|
endif( )
|
|
|
|
|
endif( )
|
|
|
|
|
qt_message( " QT_INCLUDE_DIR: ${QT_INCLUDE_DIR}" )
|
|
|
|
|
qt_message( " TQT_INCLUDE_DIR: ${TQT_INCLUDE_DIR}" )
|
|
|
|
|
|
|
|
|
|
# detect native tqt
|
|
|
|
|
if( EXISTS "${QT_INCLUDE_DIR}/ntqglobal.h" )
|
|
|
|
|
if( EXISTS "${TQT_INCLUDE_DIR}/ntqglobal.h" )
|
|
|
|
|
set( HAVE_REAL_TQT ON CACHE BOOL "Native TQt3 detected" )
|
|
|
|
|
qt_message( "Native TQt3 detected" )
|
|
|
|
|
else( )
|
|
|
|
@ -81,25 +81,25 @@ else( )
|
|
|
|
|
endif( )
|
|
|
|
|
|
|
|
|
|
# qt library path
|
|
|
|
|
if( NOT DEFINED QT_LIBRARY_DIR )
|
|
|
|
|
set( QT_LIBRARY_DIR "${QT_PREFIX_DIR}/lib${LIB_SUFFIX}" )
|
|
|
|
|
if( NOT DEFINED TQT_LIBRARY_DIR )
|
|
|
|
|
set( TQT_LIBRARY_DIR "${QT_PREFIX_DIR}/lib${LIB_SUFFIX}" )
|
|
|
|
|
if( QT_VERSION STREQUAL "4" )
|
|
|
|
|
if( NOT EXISTS "${QT_LIBRARY_DIR}/libQtGui.so" )
|
|
|
|
|
if( EXISTS "${QT_LIBRARY_DIR}/qt4/libQtGui.so" )
|
|
|
|
|
set( QT_LIBRARY_DIR "${QT_PREFIX_DIR}/lib${LIB_SUFFIX}/qt4" )
|
|
|
|
|
if( NOT EXISTS "${TQT_LIBRARY_DIR}/libQtGui.so" )
|
|
|
|
|
if( EXISTS "${TQT_LIBRARY_DIR}/qt4/libQtGui.so" )
|
|
|
|
|
set( TQT_LIBRARY_DIR "${QT_PREFIX_DIR}/lib${LIB_SUFFIX}/qt4" )
|
|
|
|
|
endif( )
|
|
|
|
|
endif( )
|
|
|
|
|
endif( )
|
|
|
|
|
endif( )
|
|
|
|
|
qt_message( " QT_LIBRARY_DIR: ${QT_LIBRARY_DIR}" )
|
|
|
|
|
qt_message( " TQT_LIBRARY_DIR: ${TQT_LIBRARY_DIR}" )
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# qt library name
|
|
|
|
|
if( NOT DEFINED QT_LIBRARIES )
|
|
|
|
|
if( NOT DEFINED TQT_LIBRARIES )
|
|
|
|
|
if( QT_VERSION STREQUAL "3" )
|
|
|
|
|
set( QT_LIBRARIES qt-mt )
|
|
|
|
|
set( TQT_LIBRARIES qt-mt )
|
|
|
|
|
elseif( QT_VERSION STREQUAL "4" )
|
|
|
|
|
set( QT_LIBRARIES QtCore QtGui )
|
|
|
|
|
set( TQT_LIBRARIES QtCore QtGui )
|
|
|
|
|
endif( )
|
|
|
|
|
endif( )
|
|
|
|
|
|
|
|
|
@ -179,8 +179,8 @@ endif( )
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tde_save( CMAKE_REQUIRED_INCLUDES CMAKE_REQUIRED_LIBRARIES )
|
|
|
|
|
set( CMAKE_REQUIRED_INCLUDES ${QT_INCLUDE_DIR} )
|
|
|
|
|
set( CMAKE_REQUIRED_LIBRARIES -L${QT_LIBRARY_DIR} ${QT_LIBRARIES} )
|
|
|
|
|
set( CMAKE_REQUIRED_INCLUDES ${TQT_INCLUDE_DIR} )
|
|
|
|
|
set( CMAKE_REQUIRED_LIBRARIES -L${TQT_LIBRARY_DIR} ${TQT_LIBRARIES} )
|
|
|
|
|
|
|
|
|
|
# check if Qt3 is usable
|
|
|
|
|
if( QT_VERSION STREQUAL "3" )
|
|
|
|
@ -192,8 +192,8 @@ if( QT_VERSION STREQUAL "3" )
|
|
|
|
|
# Unset the Qt detection variable
|
|
|
|
|
unset( HAVE_USABLE_QT${QT_VERSION} CACHE )
|
|
|
|
|
# Reset libraries
|
|
|
|
|
set( QT_LIBRARIES tqt-mt )
|
|
|
|
|
set( CMAKE_REQUIRED_LIBRARIES -L${QT_LIBRARY_DIR} ${QT_LIBRARIES} )
|
|
|
|
|
set( TQT_LIBRARIES tqt-mt )
|
|
|
|
|
set( CMAKE_REQUIRED_LIBRARIES -L${TQT_LIBRARY_DIR} ${TQT_LIBRARIES} )
|
|
|
|
|
qt_message( "Looking for native TQt3..." )
|
|
|
|
|
check_cxx_source_compiles("
|
|
|
|
|
#include <ntqapplication.h>
|
|
|
|
@ -222,8 +222,8 @@ if( QT_VERSION STREQUAL "3" )
|
|
|
|
|
# Unset the Qt detection variable
|
|
|
|
|
unset( HAVE_PATCHED_QT3 CACHE )
|
|
|
|
|
# Reset libraries
|
|
|
|
|
set( QT_LIBRARIES tqt-mt )
|
|
|
|
|
set( CMAKE_REQUIRED_LIBRARIES -L${QT_LIBRARY_DIR} ${QT_LIBRARIES} )
|
|
|
|
|
set( TQT_LIBRARIES tqt-mt )
|
|
|
|
|
set( CMAKE_REQUIRED_LIBRARIES -L${TQT_LIBRARY_DIR} ${TQT_LIBRARIES} )
|
|
|
|
|
qt_message( "Looking for patched native TQt3..." )
|
|
|
|
|
check_cxx_source_compiles("
|
|
|
|
|
#include <ntqobjectlist.h>
|
|
|
|
|