You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like cmake does not populate the @OPENCV_PC_LIBS_PRIVATE@ field in opencv.pc, at least on MacOS. I am using the homebrew build of opencv. The opencv.pc file looks like this:
As we can see the Libs.private: does not declare the static dependencies and therefore static linking fails. In the case of homebrew I would expect something like this in opencv.pc:
Obviously this depends on the exact configuration, but generally speaking, Requires.private names the .pc files for external libs that opencv was built (if they have a pc file), and Libs.private lists the bundled 3rdparty libs, and also external libs that do not have a pc file.
As a workaround I use the following to get the proper static linking LIBS:
It looks like cmake does not populate the
@OPENCV_PC_LIBS_PRIVATE@
field in opencv.pc, at least on MacOS. I am using the homebrew build of opencv. Theopencv.pc
file looks like this:As we can see the
Libs.private:
does not declare the static dependencies and therefore static linking fails. In the case of homebrew I would expect something like this inopencv.pc
:Obviously this depends on the exact configuration, but generally speaking,
Requires.private
names the.pc
files for external libs that opencv was built (if they have apc
file), andLibs.private
lists the bundled 3rdparty libs, and also external libs that do not have apc
file.As a workaround I use the following to get the proper static linking
LIBS
:The text was updated successfully, but these errors were encountered: