소스 검색

core/progs/imageDemo: do not call showImage if GLUT is not available

bodesheim 11 년 전
부모
커밋
b3d13e9bda
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      core/progs/imageDemo.cpp

+ 6 - 0
core/progs/imageDemo.cpp

@@ -26,11 +26,15 @@ int main ( int argc, char **argv )
 	ColorImage srcColor ( argv[1] );
 
   // show the image and wait for the window being closed manually
+#ifdef NICE_USELIB_GLUT
 #ifdef NICE_USELIB_QT
   showImage ( srcColor );
 #else
   cerr << "Visualization disabled: no QT library available" << endl;
 #endif
+#else 
+  cerr << "Visualization disabled: no GLUT library available" << endl;
+#endif
 
   // simple grayvalue image
   Image src;
@@ -48,9 +52,11 @@ int main ( int argc, char **argv )
   ColorImage gradientColor;
   imageToPseudoColor ( gradient, gradientColor );
 
+#ifdef NICE_USELIB_GLUT
 #ifdef NICE_USELIB_QT
   showImage ( gradientColor );
 #endif
+#endif
 
 
 }