Skip to content

Commit

Permalink
Fix build when no display available
Browse files Browse the repository at this point in the history
  • Loading branch information
fspindle committed Feb 8, 2024
1 parent 0a5d4cf commit 6da7e0b
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 6da7e0b

Please sign in to comment.