Merge topic 'qt4-query-exec-process'

858fe0e Replace exec_program with execute_process for qmake queries.
This commit is contained in:
Brad King 2011-01-19 14:28:24 -05:00 committed by CMake Topic Stage
commit b9f9c90eaf
1 changed files with 4 additions and 1 deletions

View File

@ -447,7 +447,10 @@ MACRO (_QT4_ADJUST_LIB_VARS _camelCaseBasename)
ENDMACRO (_QT4_ADJUST_LIB_VARS) ENDMACRO (_QT4_ADJUST_LIB_VARS)
function(_QT4_QUERY_QMAKE VAR RESULT) function(_QT4_QUERY_QMAKE VAR RESULT)
exec_program(${QT_QMAKE_EXECUTABLE} ARGS "-query ${VAR}" RETURN_VALUE return_code OUTPUT_VARIABLE output ) execute_process(COMMAND "${QT_QMAKE_EXECUTABLE}" -query ${VAR}
RESULT_VARIABLE return_code
OUTPUT_VARIABLE output ERROR_VARIABLE output
OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_STRIP_TRAILING_WHITESPACE)
if(NOT return_code) if(NOT return_code)
file(TO_CMAKE_PATH "${output}" output) file(TO_CMAKE_PATH "${output}" output)
set(${RESULT} ${output} PARENT_SCOPE) set(${RESULT} ${output} PARENT_SCOPE)