OpenGL interop sample reworked not ot use cvconfig.h

This commit is contained in:
Alexander Smorkalov 2014-12-30 16:45:46 +03:00
parent e02418e904
commit 091c7a3821
2 changed files with 7 additions and 9 deletions

View File

@ -71,6 +71,10 @@ if(BUILD_EXAMPLES AND OCV_DEPENDENCIES_FOUND)
file(GLOB all_samples RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp)
if(NOT WITH_OPENGL)
list(REMOVE_ITEM all_samples "opengl.cpp")
endif(NOT WITH_OPENGL)
foreach(sample_filename ${all_samples})
get_filename_component(sample ${sample_filename} NAME_WE)
file(GLOB sample_srcs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${sample}.*)
@ -82,6 +86,9 @@ endif()
if (OCV_DEPENDENCIES_FOUND AND 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)
list(REMOVE_ITEM all_samples "opengl.cpp")
endif(NOT WITH_OPENGL)
install(FILES ${install_list}
DESTINATION ${OPENCV_SAMPLES_SRC_INSTALL_PATH}/gpu
PERMISSIONS OWNER_READ GROUP_READ WORLD_READ COMPONENT samples)

View File

@ -1,13 +1,4 @@
#include <iostream>
#include "cvconfig.h"
#ifndef HAVE_OPENGL
int main()
{
std::cerr << "Library was built without OpenGL support" << std::endl;
return -1;
}
#else
#ifdef WIN32
#define WIN32_LEAN_AND_MEAN 1