Skip to content

Commit

Permalink
Merge pull request #1330 from fspindle/fix_isolated_moment
Browse files Browse the repository at this point in the history
Fix build when no display available
  • Loading branch information
fspindle authored Feb 8, 2024
2 parents 0a5d4cf + 6da7e0b commit 4f869db
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions example/moments/image/servoMomentImage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,20 @@
#include <visp3/visual_features/vpFeaturePoint.h>
#include <visp3/vs/vpServo.h>

#if !defined(VISP_HAVE_X11) && !defined(VISP_HAVE_OPENCV) && !defined(VISP_HAVE_GDI) && !defined(VISP_HAVE_D3D9) && \
!defined(VISP_HAVE_GTK) && !defined(VISP_HAVE_THREADS)
#if !defined(VISP_HAVE_DISPLAY)
int main()
{
std::cout << "Can't run this example since no display capability is available." << std::endl;
std::cout << "You should install one of the following third-party library: X11, OpenCV, GDI, GTK." << std::endl;
return EXIT_SUCCESS;
}
#elif !defined(VISP_HAVE_THREADS)
int main()
{
std::cout << "Can't run this example since multi-threading capability is not available." << std::endl;
std::cout << "You should maybe enable cxx11 standard." << std::endl;
return EXIT_SUCCESS;
}
#else

#ifndef DOXYGEN_SHOULD_SKIP_THIS
Expand Down

0 comments on commit 4f869db

Please sign in to comment.