mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-28 19:25:27 +08:00
37 lines
1.7 KiB
Diff
37 lines
1.7 KiB
Diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index 1cb24ae36..a5414e26e 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -320,6 +320,9 @@ IF(WITH_QT)
|
|
ENDIF()
|
|
ADD_DEFINITIONS(-DQT_NO_KEYWORDS) # To avoid conflicts with boost signals/foreach and Qt macros
|
|
ENDIF(QT4_FOUND OR Qt5_FOUND)
|
|
+ELSE()
|
|
+ # Unconditionally disable VTK related features since no visualization tools will be built.
|
|
+ ADD_DEFINITIONS("-DDISABLE_VTK")
|
|
ENDIF(WITH_QT)
|
|
|
|
IF(WITH_SUPERPOINT_TORCH)
|
|
diff --git a/corelib/src/Features2d.cpp b/corelib/src/Features2d.cpp
|
|
index e4048eefb..862cdc68f 100644
|
|
--- a/corelib/src/Features2d.cpp
|
|
+++ b/corelib/src/Features2d.cpp
|
|
@@ -982,7 +982,7 @@ std::vector<cv::KeyPoint> SIFT::generateKeypointsImpl(const cv::Mat & image, con
|
|
{
|
|
UASSERT(!image.empty() && image.channels() == 1 && image.depth() == CV_8U);
|
|
std::vector<cv::KeyPoint> keypoints;
|
|
-#if defined(RTABMAP_NONFREE) || CV_MAJOR_VERSION > 4 || (CV_MAJOR_VERSION == 4 && CV_MINOR_VERSION >= 3)
|
|
+#if defined(RTABMAP_NONFREE) && ( CV_MAJOR_VERSION > 4 || (CV_MAJOR_VERSION == 4 && CV_MINOR_VERSION >= 3) )
|
|
cv::Mat imgRoi(image, roi);
|
|
cv::Mat maskRoi;
|
|
if(!mask.empty())
|
|
@@ -1000,7 +1000,7 @@ cv::Mat SIFT::generateDescriptorsImpl(const cv::Mat & image, std::vector<cv::Key
|
|
{
|
|
UASSERT(!image.empty() && image.channels() == 1 && image.depth() == CV_8U);
|
|
cv::Mat descriptors;
|
|
-#if defined(RTABMAP_NONFREE) || CV_MAJOR_VERSION > 4 || (CV_MAJOR_VERSION == 4 && CV_MINOR_VERSION >= 3)
|
|
+#if defined(RTABMAP_NONFREE) && ( CV_MAJOR_VERSION > 4 || (CV_MAJOR_VERSION == 4 && CV_MINOR_VERSION >= 3) )
|
|
_sift->compute(image, keypoints, descriptors);
|
|
|
|
if( rootSIFT_ && !descriptors.empty())
|