OpenCVConfig.cmake sets paths that include spaces and need to be quoted. (Bug #2215)


Added by Justin Muncaster over 12 years ago. Updated over 12 years ago.


Status:Done Start date:2012-07-30
Priority:Normal Due date:
Assignee:Andrey Kamaev % Done:

0%

Category:build/install
Target version:2.4.3 Estimated time:0.25 hour
Affected version: Operating System:
Difficulty: HW Platform:
Pull request:

Description

On my system the generated OpenCVConfig.cmake file has the following line:

set(OpenCV_opencv_core_EXTRA_DEPS_OPT C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v4.2/lib/Win32/cudart.lib;C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v4.2/lib/Win32/cuda.lib;C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v4.2/lib/Win32/npp.lib)

This does not have the desired effect of setting the path to a library if that library has spaces in it's path. Rather, the macro evaluates to:

"C:/Progam;Files/NVIDIA;GPU; ..."

where ';' denotes the list-delimiter. This causes problems on the MSVC linker line.

To fix this I believe the "set" line that is emitted from the build system should quote the string.


Associated revisions

Revision 682dede8
Added by Andrey Kamaev over 12 years ago

#2215 Fix dependencies escaping in generated OpenCVConfig.cmake

Revision 3e59ddba
Added by Roman Donchenko about 11 years ago

Merge pull request #2215 from asmorkalov:ocv_testpack_fix

History

Updated by Justin Muncaster over 12 years ago

I thought I attached a patch to fix this, but I do not see it now. The patch simply quotes two emitted strings:

set(OPENCV_DEPENDENCIES_MAP_${suffix} "${OPENCV_DEPENDENCIES_MAP_${suffix}}set(OpenCV_${__ocv_lib}_DEPS_${suffix} \"${${__ocv_lib}_MODULE_DEPS_${suffix}}\")\n")

set(OPENCV_DEPENDENCIES_MAP_${suffix} "${OPENCV_DEPENDENCIES_MAP_${suffix}}set(OpenCV_${__ocv_lib}_EXTRA_DEPS_${suffix} \"${${__ocv_lib}_EXTRA_DEPS_${suffix}}\")\n")

Updated by Andrey Kamaev over 12 years ago

  • Assignee changed from Alexander Shishkov to Andrey Kamaev

Updated by Andrey Kamaev over 12 years ago

Thanks for the report.
Bugfix is pushed to OpenCV master.

  • Status changed from Open to Done

Also available in: Atom PDF