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 Nov 26, 2023
1 parent 5be33d4 commit 87ef29c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmake/templates/vpConfig.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@
#cmakedefine VISP_HAVE_D3D9

// Defined if one of the display device is available
#if defined(VISP_HAVE_X11) || defined(VISP_HAVE_GDI) || defined(VISP_HAVE_OPENCV) || defined(VISP_HAVE_D3D9) || defined(VISP_HAVE_GTK)
#if defined(VISP_HAVE_X11) || defined(VISP_HAVE_GDI) || defined(HAVE_OPENCV_HIGHGUI) || defined(VISP_HAVE_D3D9) || defined(VISP_HAVE_GTK)
# define VISP_HAVE_DISPLAY
#endif

Expand Down
4 changes: 3 additions & 1 deletion tutorial/image/drawingHelpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,9 @@ vpDisplayD3D drawingHelpers::d_IcannyImgFilter;
#endif

void drawingHelpers::init(vpImage<unsigned char> &Iinput, vpImage<unsigned char> &IcannyVisp, vpImage<unsigned char> *p_dIx,
vpImage<unsigned char> *p_dIy, vpImage<unsigned char> *p_IcannyimgFilter)
vpImage<unsigned char> *p_dIy, vpImage<unsigned char> *p_IcannyimgFilter)
{
#if defined(VISP_HAVE_DISPLAY)
d_Iinput.init(Iinput, 10, 10);
d_IcannyVisp.init(IcannyVisp, 10, Iinput.getHeight() + 10 * 2);
if (p_dIx != nullptr) {
Expand All @@ -78,6 +79,7 @@ void drawingHelpers::init(vpImage<unsigned char> &Iinput, vpImage<unsigned char>
if (p_IcannyimgFilter != nullptr) {
d_IcannyImgFilter.init(*p_IcannyimgFilter, Iinput.getWidth() + 2 * 10, Iinput.getHeight() + 10 * 2);
}
#endif
}

void drawingHelpers::display(vpImage<unsigned char> &I, const std::string &title)
Expand Down

0 comments on commit 87ef29c

Please sign in to comment.