Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I found out how to work around this problem. The problem is that MS VC is usually able to cope with "/" but it seems to require an absolute path, i.e. a drive letter. One approach would be to somehow get CMAKE to use an absolute path when CMAKE_CURRENT_SOURCE_DIR is used, but I had not sufficient time to find a way to do this. Therefore, I reverted to the ugly hack of modifying the file

[..]\opencv-master\cmake\OpenCVModule.cmake

by changing line

ocv_add_precompiled_header_to_target(${the_target} "${CMAKE_CURRENT_SOURCE_DIR}/${pch_path}precomp.hpp")

to

ocv_add_precompiled_header_to_target(${the_target} "C:/${CMAKE_CURRENT_SOURCE_DIR}/${pch_path}precomp.hpp")

Not nice, but it works.

Cheers, Andreas