From 33df08b7046c2da7d9559e71620fc89ebf179429 Mon Sep 17 00:00:00 2001 From: Hrvoje Senjan Date: Tue, 26 May 2015 21:02:58 +0200 Subject: [PATCH 4/5] Specify _include dirs as INCLUDE_DIRECTORIES. It appears try_compile's CMAKE_FLAGS will take only one argument. Fixes build with includes in non-standard paths. CCMAIL: sitter@kde.org --- cmake/FindPhononInternal.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/FindPhononInternal.cmake b/cmake/FindPhononInternal.cmake index 1d98f27..aced185 100644 --- a/cmake/FindPhononInternal.cmake +++ b/cmake/FindPhononInternal.cmake @@ -409,7 +409,7 @@ if (CMAKE_COMPILER_IS_GNUCXX) file(WRITE "${_source_file}" "${_source}") set(_include_dirs "-DINCLUDE_DIRECTORIES:STRING=${QT_INCLUDES}") - try_compile(_compile_result ${CMAKE_BINARY_DIR} ${_source_file} CMAKE_FLAGS "${CMAKE_CXX_FLAGS} ${_include_dirs}" OUTPUT_VARIABLE _compile_output_var) + try_compile(_compile_result ${CMAKE_BINARY_DIR} ${_source_file} CMAKE_FLAGS "${CMAKE_CXX_FLAGS}" INCLUDE_DIRECTORIES "${_include_dirs}" OUTPUT_VARIABLE _compile_output_var) if(NOT _compile_result) message("${_compile_output_var}") -- 1.9.3