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 | fd184a6b47c3a1b584e359fbbbcb16cb66110229 (patch) | |
tree | 74454dd20358cd3e941ad15b5ce60f323788e3c9 | |
parent | a8e9c1fde796047126278993e0932060908ececd (diff) | |
download | other-fd184a6b47c3a1b584e359fbbbcb16cb66110229.tar.gz other-fd184a6b47c3a1b584e359fbbbcb16cb66110229.zip |
Add Qt autodetect option
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kde-common@1225945 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
-rw-r--r-- | cmake/modules/FindQt.cmake | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/cmake/modules/FindQt.cmake b/cmake/modules/FindQt.cmake index 30e8d2b..3aa2b5b 100644 --- a/cmake/modules/FindQt.cmake +++ b/cmake/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 ) |