mirror of
https://github.com/reactos/CMake.git
synced 2024-11-29 22:40:25 +00:00
Merge branch 'remove-qmake-query'
This commit is contained in:
commit
1a759b7d05
@ -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
|
||||
|
@ -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})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user