From 0f01d8df1cf186f673d141915ad5c553b93266ec Mon Sep 17 00:00:00 2001 From: Andrey Kamaev Date: Mon, 18 Jun 2012 09:19:57 +0000 Subject: [PATCH] Fixed Visual Studio precompiled headers --- cmake/OpenCVPCHSupport.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/OpenCVPCHSupport.cmake b/cmake/OpenCVPCHSupport.cmake index c9fe29ced..16dbb06a9 100644 --- a/cmake/OpenCVPCHSupport.cmake +++ b/cmake/OpenCVPCHSupport.cmake @@ -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)