将OPENCV作为CMAKE项目的一部分编译
如何作为项目的一部分编译CMAKE源代码。假设我在我的app/exters
目录中从github克隆了openCV,并且有一个可执行文件,则以/app/main.cpp
的速度使用。 Cmake的find_package()
和find_library()
命令不起作用,因为我只有源代码,并且想使用我的应用程序开始对OpenCV进行编译。
我知道有关将OpenCV链接到可执行文件的其他简单方法,但我想以这种方式为此项目做。所有建议都受到欢迎。
项目结构就像
/app
/external
/opencv
main.cpp
CMakeLists.txt
How can I compile Cmake source code as part of my project. Say I cloned opencv from github in my app/external
directory and there is one executable as /app/main.cpp
. CMake's find_package()
and find_library()
commands does not works because I only have the source code and want to start compiling process of opencv with my app.
I am aware of there are other easy methods about linking opencv to executable but I want do at this way for this project. All suggestions are welcomed.
project structure be like
/app
/external
/opencv
main.cpp
CMakeLists.txt
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论