How do I tell cmake I want my project to link libraries statically?

后端 未结 7 544
暗喜
暗喜 2020-12-14 02:15

I\'m trying to build an OpenCV-based project using CMake, running on Linux. So far my CMakeLists.txt files looks something like

FIND_PACKAGE (Op         


        
相关标签:
7条回答
  • 2020-12-14 02:58

    Note that gcc refuses to link if you pass the -static option, but you have dynamic libs in the link arguments - which you will if you just simply use FindOpenCV.cmake and this picks up the dynamic libs (I don't know how OpenCVConfig.cmake behaves though)...

    0 讨论(0)
提交回复
热议问题