The following issue has been SUBMITTED.
======================================================================
https://cmake.org/Bug/view.php?id=16053
======================================================================
Reported By: Guillaume Dumont
Assigned To:
======================================================================
Project: CMake
Issue ID: 16053
Category: CMake
Reproducibility: always
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 2016-04-07 11:26 EDT
Last Modified: 2016-04-07 11:26 EDT
======================================================================
Summary: $<SHELL_PATH:...> should return a short path on
Windows when containing spaces
Description:
I am trying to build OpenCV from sources using MSVC and the Ninja Generator and
I have a failing build because of linker flags added to the
target_link_libraries. OpenCV's CMakeLists.txt uses this line of CMake code:
set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} -L${p})
OPENCV_LINKER_LIBS is passed to target_link_libraries afterwards. The problem
with this line is that it does not work on Windows with the Ninja generator. I
tried:
set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS}
${CMAKE_LIBRARY_PATH_FLAG}$<SHELL_PATH:${p}>)
but that does not work either because the even though we end up using /LIBPATH:
instead of /L and backslashes instead of forward slashes the path contains
spaces and ninja throws a link error.
Shouldn't SHELL_PATH return a short path, or a path between quotes when the path
contains spaces on Windows?
Steps to Reproduce:
Try to build OpenCV 3.1.0 on Windows with Ninja.
Additional Information:
See OpenCV issue: https://github.com/Itseez/opencv/issues/6372
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2016-04-07 11:26 Guillaume DumontNew Issue
======================================================================
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers