Commit 0f01d8df authored by Andrey Kamaev's avatar Andrey Kamaev

Fixed Visual Studio precompiled headers

parent f7c1d16b
......@@ -328,7 +328,7 @@ ENDMACRO(ADD_NATIVE_PRECOMPILED_HEADER)
macro(ocv_add_precompiled_header_to_target the_target pch_header)
if(PCHSupport_FOUND AND ENABLE_PRECOMPILED_HEADERS AND EXISTS "${pch_header}")
if(CMAKE_GENERATOR MATCHES Visual)
set(${the_target}_pch "${pch_header}")
string(REGEX REPLACE "hpp$" "cpp" ${the_target}_pch "${pch_header}")
add_native_precompiled_header(${the_target} ${pch_header})
unset(${the_target}_pch)
elseif(CMAKE_GENERATOR MATCHES Xcode)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment