OpenCVConfig.cmake sets paths that include spaces and need to be quoted. (Bug #2215)
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
#2215 Fix dependencies escaping in generated OpenCVConfig.cmake
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