Plethora of CMake errors about absolute and relative destinations

asked 2013-10-27 04:32:50 -0600

dumbledad gravatar image

updated 2013-10-28 08:07:51 -0600

Having downloaded the latest OpenCV source code from github on the 26th of October 2013 I have run CMake (cmake-gui 2.8.12) first 'Configue' and then 'Generate'. Generating the build directory throws a bunch of errors, starting with Error in generation process, project files may be invalid:

error screenshot

The first group I think it is safe for me to ignore, they look like this:

CMake Warning (dev) in apps/haartraining/CMakeLists.txt:
Policy CMP0022 is not set: INTERFACE_LINK_LIBRARIES defines the link interface. Run "cmake --help-policy CMP0022" for policy details. Use the cmake_policy command to set the policy and suppress this warning.

Static library target "opencv_haartraining_engine" has a
INTERFACE_LINK_LIBRARIES property. This should be preferred as the source of the link interface for this library. Ignoring the property and using the link implementation as the link interface instead. This warning is for project developers. Use -Wno-dev to suppress it.

But the last list of errors has me more worried. What are these? Should I act on them? How should I fix them?

CMake Error: install(EXPORT "OpenCVModules") given absolute DESTINATION "/lib" but the export references an installation of target "opencv_core" which has relative DESTINATION "lib".

CMake Error: install(EXPORT "OpenCVModules") given absolute DESTINATION "/lib" but the export references an installation of target "opencv_core" which has relative DESTINATION "bin".

CMake Error: install(EXPORT "OpenCVModules") given absolute DESTINATION "/lib" but the export references an installation of target "opencv_flann" which has relative DESTINATION "lib".

CMake Error: install(EXPORT "OpenCVModules") given absolute DESTINATION "/lib" but the export references an installation of target "opencv_flann" which has relative DESTINATION "bin".

[...]

CMake Error: install(EXPORT "OpenCVModules") given absolute DESTINATION "/lib" but the export references an installation of target "opencv_videostab" which has relative DESTINATION "lib".

CMake Error: install(EXPORT "OpenCVModules") given absolute DESTINATION "/lib" but the export references an installation of target "opencv_videostab" which has relative DESTINATION "bin".

cmake-gui screenshot with errors showing

========== EDIT ===========

I wonder if the problem here is that the CMake value CMAKE_USE_RELATIVE_PATHS which is present when running CMake on the code for release 2.4.6 is not present when running CMake on the latest code. If so, what is the fix?

(N.B. I have added this as an OpenCV issue/bug.)

edit retag flag offensive close merge delete