Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build when no display available #1282

Merged
merged 1 commit into from
Nov 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading