# Importing OpenCV, versions conflicts

**URL:** https://discourse.cmake.org/t/importing-opencv-versions-conflicts/3343
**Category:** Usage
**Created:** [May 17, 2021, 9:49am UTC](https://discourse.cmake.org/t/importing-opencv-versions-conflicts/3343 "2021-05-17T09:49:56Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![adaldev](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/a/9dc877/32.png) [@adaldev](https://discourse.cmake.org/u/adaldev)
#### Post date: [May 17, 2021, 3:23pm UTC](https://discourse.cmake.org/t/importing-opencv-versions-conflicts/3343/3 "2021-05-17T15:23:05Z")

</div>

Hi

This is the LConfig.cmake  
include(CMakeFindDependencyMacro)  
foreach(_lib_ IN ITEMS OpenCV;OtherDependencies)  
find\_dependency(${_lib_} REQUIRED)  
endforeach()

# include the generated target file  
include("${CMAKE\_CURRENT\_LIST\_DIR}/LTargets.cmake")

L and A use find\_package(OpenCV REQUIRED) and wrap it into OpenCV::OpenCV as described above

is it not the proper way to go?  
(by the way in this thread [proper way to wrap an imported target around a third-party target - #8 by adaldev](https://discourse.cmake.org/t/proper-way-to-wrap-an-imported-target-around-a-third-party-target/2757/8), I described several generic use cases for which I failed to find a clear and correct procedure).

thanks

---

_[View the full topic](https://discourse.cmake.org/t/importing-opencv-versions-conflicts/3343)._
