diff options
author | samelian <samelian@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-10 22:58:53 +0000 |
---|---|---|
committer | samelian <samelian@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-10 22:58:53 +0000 |
commit | 62d21a9e38ad3d535770e2f049b7f72c7b6b5d0e (patch) | |
tree | af92649a0db6a9875f9a46ac427976f55d3e2def | |
parent | 45bcef7b050c2da52a830b9abeadcc661f851c74 (diff) | |
download | tde-cmake-62d21a9e38ad3d535770e2f049b7f72c7b6b5d0e.tar.gz tde-cmake-62d21a9e38ad3d535770e2f049b7f72c7b6b5d0e.zip |
[kde-common/cmake] FindQt.cmake: checking for patched Qt; added more flags to QT_DEFINITIONS
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kde-common/cmake@1213590 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
-rw-r--r-- | modules/FindQt.cmake | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/modules/FindQt.cmake b/modules/FindQt.cmake index dd3490d..491a2fc 100644 --- a/modules/FindQt.cmake +++ b/modules/FindQt.cmake @@ -84,9 +84,23 @@ if( NOT QT_FOUND ) endif( NOT QT_LIBRARY_DIRS ) - message( STATUS " found Qt, version ${__version}" ) + # check if Qt3 is patched for compatibility with TQt + tde_save( CMAKE_REQUIRED_INCLUDES CMAKE_REQUIRED_LIBRARIES ) + set( CMAKE_REQUIRED_INCLUDES ${QT_INCLUDE_DIRS} ) + set( CMAKE_REQUIRED_LIBRARIES -L${QT_LIBRARY_DIRS} qt-mt ) + check_cxx_source_compiles(" + #include <qobjectlist.h> + #include <qobject.h> + int main(int, char**) { QObject::objectTreesListObject(); return 0; } " + HAVE_PATCHED_QT3 ) + tde_restore( CMAKE_REQUIRED_INCLUDES CMAKE_REQUIRED_LIBRARIES ) + if( NOT HAVE_PATCHED_QT3 ) + tde_message_fatal( "Your Qt3 is not patched for compatibility with tqtinterface" ) + endif() + + message( STATUS " found patched Qt, version ${__version}" ) set( QT_FOUND true CACHE INTERNAL QT_FOUND FORCE ) set( QT_LIBRARIES "qt-mt" CACHE INTERNAL QT_LIBRARIES FORCE ) - set( QT_DEFINITIONS "-DQT_NO_ASCII_CAST -DQT_CLEAN_NAMESPACE -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION" CACHE INTERNAL QT_DEFINITIONS FORCE ) + set( QT_DEFINITIONS "-DQT_NO_ASCII_CAST -DQT_CLEAN_NAMESPACE -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -DQT_THREAD_SUPPORT -D_REENTRANT" CACHE INTERNAL QT_DEFINITIONS FORCE ) endif( NOT QT_FOUND ) |