Repository navigation
Fix compile error with external TBB and -DBUILD_SHARED_LIBS=OFF - #14308
Merged
Merged
Conversation
Member
|
Thank you! As a "bugfix" this patch should go into 3.4 branch first. We will merge changes from 3.4 into master regularly (weekly/bi-weekly). So, please:
Note: no needs to re-open PR, apply changes "inplace". |
Adds IMPORTED for the TBB::tbb alias target as otherwise cmake produces the following error: CMake Error: install(EXPORT "OpenCVModules" ...) includes target "opencv_core" which requires target "tbb" that is not in the export set. This problem occurs with the defaults used by homebrew on macOS, which compiles both static and shared versions of TBB and OpenCV.
opencv-pushbot
pushed a commit
that referenced
this pull request
Apr 16, 2019
Merged
SavyaSanchi-Sharma
pushed a commit
to SavyaSanchi-Sharma/opencv
that referenced
this pull request
Jul 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
IMPORTEDfor theTBB::tbbalias target as otherwise cmake produces the following error:This problem occurs with the defaults used by homebrew on macOS, which compiles both static and shared versions of TBB and OpenCV. The problem should also occur on other platforms when
-DBUILD_SHARED_LIBS=OFFis set and an external TBB library is used. However, I don't have the setup to verify this in practice.A similar fix is implemented in #12741 for another module.