diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-03-25 08:29:05 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-03-25 08:29:05 +0000 |
commit | 7cc3c63488b66092dd5a9e26497f5c57e5f66b3f (patch) | |
tree | d73cb698ec57c463471d511da92db3ea7ac104e7 | |
parent | acd7af9b20453aa77612c59edc95351e0ad98869 (diff) | |
download | tde-cmake-7cc3c63488b66092dd5a9e26497f5c57e5f66b3f.tar.gz tde-cmake-7cc3c63488b66092dd5a9e26497f5c57e5f66b3f.zip |
Add Qt autodetect option
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kde-common/cmake@1225945 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
-rw-r--r-- | modules/FindQt.cmake | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/modules/FindQt.cmake b/modules/FindQt.cmake index 30e8d2b..3aa2b5b 100644 --- a/modules/FindQt.cmake +++ b/modules/FindQt.cmake @@ -19,6 +19,7 @@ macro( __tde_internal_find_qt_program __progname __output ) endif( NOT ${__output} ) endmacro( __tde_internal_find_qt_program ) +option( AUTODETECT_QT_DIRS "Attempt to autodetect Qt location and version [EXPERIMENTAL]" OFF ) option( WITH_QT3 "Use TQt for Qt3" ON ) option( WITH_QT4 "Use TQt for Qt4 [EXPERIMENTAL]" OFF ) @@ -116,6 +117,15 @@ if( WITH_QT4 ) endif( WITH_QT4 ) if( WITH_QT3 ) + # Set a default if not manually set + if ( AUTODETECT_QT_DIRS ) + if ( NOT QT_INCLUDE_DIRS ) + set( QT_INCLUDE_DIRS "/usr/include/qt3" ) + endif ( NOT QT_INCLUDE_DIRS ) + if ( NOT QT_LIBRARY_DIRS ) + set( QT_LIBRARY_DIRS "/usr/lib" ) + endif ( NOT QT_LIBRARY_DIRS ) + endif ( AUTODETECT_QT_DIRS ) # we search for moc only if is not already set (by user or previous run of cmake) if( NOT QT_MOC_EXECUTABLE ) |