mirror of
https://github.com/opencv/opencv.git
synced 2025-01-18 14:13:15 +08:00
OpenGL interop sample reworked not ot use cvconfig.h
This commit is contained in:
parent
e02418e904
commit
091c7a3821
@ -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)
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user