From 9f3b1f7e50cc6fd93ae9638e8039aa9265b2d853 Mon Sep 17 00:00:00 2001 From: Vladislav Vinogradov Date: Fri, 15 Jul 2016 15:14:56 +0300 Subject: [PATCH] use HAVE_OPENGL instead of WITH_OPENGL for GPU opengl sample in this case the sample will not be built if OpenGL is not found --- samples/gpu/CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/samples/gpu/CMakeLists.txt b/samples/gpu/CMakeLists.txt index 852a8c2da..8c97ea865 100644 --- a/samples/gpu/CMakeLists.txt +++ b/samples/gpu/CMakeLists.txt @@ -81,9 +81,9 @@ if(BUILD_EXAMPLES AND OCV_DEPENDENCIES_FOUND) file(GLOB all_samples RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp) - if(NOT WITH_OPENGL) + if(NOT HAVE_OPENGL) list(REMOVE_ITEM all_samples "opengl.cpp") - endif(NOT WITH_OPENGL) + endif() foreach(sample_filename ${all_samples}) get_filename_component(sample ${sample_filename} NAME_WE) @@ -96,9 +96,9 @@ endif() if(INSTALL_C_EXAMPLES AND NOT WIN32) file(GLOB install_list *.c *.cpp *.jpg *.png *.data makefile.* build_all.sh *.dsp *.cmd ) - if(NOT WITH_OPENGL) + if(NOT HAVE_OPENGL) list(REMOVE_ITEM install_list "opengl.cpp") - endif(NOT WITH_OPENGL) + endif() install(FILES ${install_list} DESTINATION ${OPENCV_SAMPLES_SRC_INSTALL_PATH}/gpu PERMISSIONS OWNER_READ GROUP_READ WORLD_READ COMPONENT samples)