Detect opencv with world
This commit is contained in:
parent
064b536822
commit
0af640015b
|
@ -25,6 +25,11 @@ else()
|
||||||
add_definitions(-DUSE_OPENCV4)
|
add_definitions(-DUSE_OPENCV4)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
list(FIND OpenCV_LIBS "opencv_world" __index)
|
||||||
|
if(${__index} GREATER -1)
|
||||||
|
set(WITH_OPENCV_WORLD TRUE)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(MSVC OR MSYS OR MINGW)
|
if(MSVC OR MSYS OR MINGW)
|
||||||
get_filename_component(OpenCV_LIB_SEARCH_PATH "${OpenCV_LIB_PATH}/../bin" ABSOLUTE)
|
get_filename_component(OpenCV_LIB_SEARCH_PATH "${OpenCV_LIB_PATH}/../bin" ABSOLUTE)
|
||||||
else()
|
else()
|
||||||
|
|
|
@ -19,6 +19,7 @@ OpenCV_VERSION_MINOR: @OpenCV_VERSION_MINOR@
|
||||||
OpenCV_VERSION_PATCH: @OpenCV_VERSION_PATCH@
|
OpenCV_VERSION_PATCH: @OpenCV_VERSION_PATCH@
|
||||||
OpenCV_VERSION_TWEAK: @OpenCV_VERSION_TWEAK@
|
OpenCV_VERSION_TWEAK: @OpenCV_VERSION_TWEAK@
|
||||||
OpenCV_VERSION_STATUS: "@OpenCV_VERSION_STATUS@"
|
OpenCV_VERSION_STATUS: "@OpenCV_VERSION_STATUS@"
|
||||||
|
OpenCV_WITH_WORLD: "@WITH_OPENCV_WORLD@"
|
||||||
MYNTEYE_VERSION: "@mynteye_VERSION@"
|
MYNTEYE_VERSION: "@mynteye_VERSION@"
|
||||||
MYNTEYE_VERSION_MAJOR: @mynteye_VERSION_MAJOR@
|
MYNTEYE_VERSION_MAJOR: @mynteye_VERSION_MAJOR@
|
||||||
MYNTEYE_VERSION_MINOR: @mynteye_VERSION_MINOR@
|
MYNTEYE_VERSION_MINOR: @mynteye_VERSION_MINOR@
|
||||||
|
|
|
@ -127,6 +127,8 @@ std::vector<std::string> get_plugin_paths() {
|
||||||
// int opencv_version_patch = fs["OpenCV_VERSION_PATCH"];
|
// int opencv_version_patch = fs["OpenCV_VERSION_PATCH"];
|
||||||
// int opencv_version_tweak = fs["OpenCV_VERSION_TWEAK"];
|
// int opencv_version_tweak = fs["OpenCV_VERSION_TWEAK"];
|
||||||
// std::string opencv_version_status = fs["OpenCV_VERSION_STATUS"];
|
// std::string opencv_version_status = fs["OpenCV_VERSION_STATUS"];
|
||||||
|
std::string opencv_with_world = fs["OpenCV_WITH_WORLD"];
|
||||||
|
to_lower(opencv_with_world);
|
||||||
|
|
||||||
std::string mynteye_version = fs["MYNTEYE_VERSION"];
|
std::string mynteye_version = fs["MYNTEYE_VERSION"];
|
||||||
// int mynteye_version_major = fs["MYNTEYE_VERSION_MAJOR"];
|
// int mynteye_version_major = fs["MYNTEYE_VERSION_MAJOR"];
|
||||||
|
@ -159,10 +161,13 @@ std::vector<std::string> get_plugin_paths() {
|
||||||
// lib_prefix + "plugin_b_ocl" + ocl_version,
|
// lib_prefix + "plugin_b_ocl" + ocl_version,
|
||||||
lib_prefix + "plugin_g_cuda" + cuda_version,
|
lib_prefix + "plugin_g_cuda" + cuda_version,
|
||||||
};
|
};
|
||||||
|
std::string opencv_name("_opencv" + opencv_version);
|
||||||
|
if (opencv_with_world == "true") {
|
||||||
|
opencv_name.append("-world");
|
||||||
|
}
|
||||||
for (auto &&prefix : prefixes) {
|
for (auto &&prefix : prefixes) {
|
||||||
names.push_back(
|
names.push_back(prefix + opencv_name + "_mynteye" + mynteye_version);
|
||||||
prefix + "_opencv" + opencv_version + "_mynteye" + mynteye_version);
|
names.push_back(prefix + opencv_name);
|
||||||
names.push_back(prefix + "_opencv" + opencv_version);
|
|
||||||
names.push_back(prefix);
|
names.push_back(prefix);
|
||||||
}
|
}
|
||||||
for (auto &&name : names) {
|
for (auto &&name : names) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user