[CMake] Building Opencv and linking its library as external project

Kamal Selvam infikamal5 at gmail.com
Wed Feb 19 05:35:42 EST 2020


Hello,

I started learning CMAKE recently. I am encountering the philosophy of
targets and properties since version 3.0.

I have a project where I should build OpenCV residing in my project folder
as /myproject/third-party/opencv and then link it's library to my own
target.

After searching a lot on stack overflow and internet, I always find CMake
scripts of version < 2.8. Every single answer is unique. I could not find
any proper example of building a third-party libraries the right way,
exporting them and linking them with my own targets.

Could some guide me or post a example of best way to build a external
project like opencv residing inside the project folder and linking it's
library to my own targets.

Thank you,

Best regards,
Kamal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20200219/bc1e67d0/attachment.html>


More information about the CMake mailing list