OpenCV static library in Yocto
OpenCV is built either as a shared object or a static library, not both. Yocto recipe in the meta-oe builds the library as shared objects, which is a sensible default for sure.
As a note to future self, one way to build a subset of OpenCV as a static library instead is to add the following in e.g. conf/local.conf
PACKAGECONFIG:pn-opencv = " gstreamer"
EXTRA_OECMAKE:append:pn-opencv = " \
-DBUILD_SHARED_LIBS=OFF \
-DENABLE_PIC=ON \
-DWITH_PROTOBUF=OFF \
-DBUILD_PROTOBUF=OFF \
-DBUILD_opencv_python2=OFF \
-DBUILD_opencv_python3=OFF \
-DBUILD_JAVA=OFF \
"
Comments
Post a Comment