Remove macro for querying qmake for qmake variables.

Remove last place for querying qmake values.
Also removed internal macro to support querying qmake.
Depends on findthreads-irix topic.
This commit is contained in:
Clinton Stimpson 2010-06-12 13:00:08 -06:00
parent a7abcd1442
commit 1f608718fc
2 changed files with 5 additions and 30 deletions

View File

@ -360,34 +360,6 @@ SET( QT_DEFINITIONS "")
SET(QT4_INSTALLED_VERSION_TOO_OLD FALSE)
# macro for asking qmake to process pro files
MACRO(QT_QUERY_QMAKE outvar invar)
IF(QT_QMAKE_EXECUTABLE)
FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmpQmake/tmp.pro
"message(CMAKE_MESSAGE<$$${invar}>)")
# Invoke qmake with the tmp.pro program to get the desired
# information. Use the same variable for both stdout and stderr
# to make sure we get the output on all platforms.
EXECUTE_PROCESS(COMMAND ${QT_QMAKE_EXECUTABLE}
WORKING_DIRECTORY
${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmpQmake
OUTPUT_VARIABLE _qmake_query_output
RESULT_VARIABLE _qmake_result
ERROR_VARIABLE _qmake_query_output )
FILE(REMOVE_RECURSE
"${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmpQmake")
IF(_qmake_result)
MESSAGE(WARNING " querying qmake for ${invar}. qmake reported:\n${_qmake_query_output}")
ELSE(_qmake_result)
STRING(REGEX REPLACE ".*CMAKE_MESSAGE<([^>]*).*" "\\1" ${outvar} "${_qmake_query_output}")
ENDIF(_qmake_result)
ENDIF(QT_QMAKE_EXECUTABLE)
ENDMACRO(QT_QUERY_QMAKE)
GET_FILENAME_COMPONENT(qt_install_version "[HKEY_CURRENT_USER\\Software\\trolltech\\Versions;DefaultQtVersion]" NAME)
# check for qmake
# Debian uses qmake-qt4

View File

@ -301,8 +301,11 @@ IF(Q_WS_X11)
# X11 libraries Qt always depends on
SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${X11_Xext_LIB} ${X11_X11_LIB})
QT_QUERY_QMAKE(QT_LIBS_THREAD "QMAKE_LIBS_THREAD")
SET(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} ${QT_LIBS_THREAD})
set(CMAKE_THREAD_PREFER_PTHREADS 1)
find_package(Threads)
if(CMAKE_USE_PTHREADS_INIT)
SET(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} ${CMAKE_THREAD_LIBS_INIT})
endif(CMAKE_USE_PTHREADS_INIT)
SET (QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} ${CMAKE_DL_LIBS})