Opened 10 years ago

Closed 10 years ago

#42390 closed defect (fixed)

OpenCV: CMake configuration files placed in wrong directory

Reported by: sean@… Owned by: stromnov (Andrey Stromnov)
Priority: Normal Milestone:
Component: ports Version: 2.2.1
Keywords: haspatch Cc: cooljeanius (Eric Gallager)
Port: opencv

Description

According to the CMake documentation (as of 2.8.12), CMake configuration files for packages should be placed in one of the following directories:

<prefix>/(lib/<arch>|lib|share)/cmake/<name>*/
<prefix>/(lib/<arch>|lib|share)/<name>*/
<prefix>/(lib/<arch>|lib|share)/<name>*/(cmake|CMake)/

However, the current opencv portfile puts the *.cmake files in <prefix>/lib/cmake, which causes CMake's find_package command to fail. The relevant lines from the Portfile:

xinstall -d ${destroot}${prefix}/lib/cmake
move ${destroot}${prefix}/share/OpenCV/OpenCVConfig-version.cmake \
        ${destroot}${prefix}/share/OpenCV/OpenCVConfig.cmake \
        ${destroot}${prefix}/share/OpenCV/OpenCVModules.cmake \
        ${destroot}${prefix}/share/OpenCV/OpenCVModules-release.cmake \
        ${destroot}${prefix}/lib/cmake/

Suggest that this post-destroot step be removed since it looks like the *.cmake files are already in a location where CMake can find them, under ${destroot}${prefix}/share/OpenCV/.

Patch attached.

Attachments (1)

opencv-patch.diff (832 bytes) - added by sean@… 10 years ago.

Download all attachments as: .zip

Change History (5)

Changed 10 years ago by sean@…

Attachment: opencv-patch.diff added

comment:1 Changed 10 years ago by sean@…

Cc: sean@… added

Cc Me!

comment:2 Changed 10 years ago by mf2k (Frank Schima)

Cc: stromnov sean@… removed
Keywords: haspatch added
Owner: changed from macports-tickets@… to stromnov@…

Trac requires complete email addresses. As reporter, you do not need to Cc yourself.

comment:3 Changed 10 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

comment:4 Changed 10 years ago by stromnov (Andrey Stromnov)

Resolution: fixed
Status: newclosed

Fixed at r117109.

Thanks!

Note: See TracTickets for help on using tickets.