summaryrefslogtreecommitdiffstats
path: root/ConfigureChecks.cmake
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2024-05-23 13:33:58 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2024-05-23 13:33:58 +0900
commitb56bc45e72e5f17b3215713b1ff3af8db08f9599 (patch)
treeb16deed44fb8983ccbb4e72e194d0ac07386b817 /ConfigureChecks.cmake
parent9231ecd6ce44e89e68e078e3836be2921094ef55 (diff)
downloadtqtinterface-b56bc45e72e5f17b3215713b1ff3af8db08f9599.tar.gz
tqtinterface-b56bc45e72e5f17b3215713b1ff3af8db08f9599.zip
Remove check for Qt3
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'ConfigureChecks.cmake')
-rw-r--r--ConfigureChecks.cmake50
1 files changed, 9 insertions, 41 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index b1068f3..a95a7dd 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -119,52 +119,20 @@ endif( )
qt_message( " UIC_EXECUTABLE: ${UIC_EXECUTABLE}" )
+# check if TQt3 is usable
tde_save( CMAKE_REQUIRED_INCLUDES CMAKE_REQUIRED_LIBRARIES )
+
+set( TQT_LIBRARIES tqt-mt )
set( CMAKE_REQUIRED_INCLUDES ${TQT_INCLUDE_DIR} )
set( CMAKE_REQUIRED_LIBRARIES -L${TQT_LIBRARY_DIR} ${TQT_LIBRARIES} )
-# check if TQt3 is usable
-check_cxx_source_compiles("
- #include <qapplication.h>
- int main(int argc, char **argv) { QApplication app(argc, argv); return 0; } "
- HAVE_USABLE_QT${QT_VERSION} )
- if( NOT HAVE_USABLE_QT${QT_VERSION} )
- # Unset the Qt detection variable
- unset( HAVE_USABLE_QT${QT_VERSION} CACHE )
- # Reset 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>
- int main(int argc, char **argv) { TQApplication app(argc, argv); return 0; } "
- HAVE_USABLE_QT${QT_VERSION} )
- endif( )
-if( NOT HAVE_USABLE_QT${QT_VERSION} )
- tde_message_fatal( "Unable to build a simple Qt${QT_VERSION} test." )
-endif( )
-
-# check if Qt3 is patched for compatibility with TQt
+qt_message( "Looking for native TQt3..." )
check_cxx_source_compiles("
- #include <qobjectlist.h>
- #include <qobject.h>
- int main(int, char**) { QObject::objectTreesListObject(); return 0; } "
- HAVE_PATCHED_QT3 )
- if( NOT HAVE_PATCHED_QT3 )
- # Unset the Qt detection variable
- unset( HAVE_PATCHED_QT3 CACHE )
- # Reset 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>
- #include <ntqobject.h>
- int main(int, char**) { TQObject::objectTreesListObject(); return 0; } "
- HAVE_PATCHED_QT3 )
- endif( )
-if( NOT HAVE_PATCHED_QT3 )
- tde_message_fatal( "Your Qt3 is not patched for compatibility with tqtinterface." )
+ #include <ntqapplication.h>
+ int main(int argc, char **argv) { TQApplication app(argc, argv); return 0; } "
+ HAVE_USABLE_QT)
+if( NOT HAVE_USABLE_QT )
+ tde_message_fatal( "Unable to build a simple TQt${QT_VERSION} test." )
endif( )
tde_restore( CMAKE_REQUIRED_INCLUDES CMAKE_REQUIRED_LIBRARIES )