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)
|
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})
|
foreach(sample_filename ${all_samples})
|
||||||
get_filename_component(sample ${sample_filename} NAME_WE)
|
get_filename_component(sample ${sample_filename} NAME_WE)
|
||||||
file(GLOB sample_srcs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${sample}.*)
|
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)
|
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 )
|
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}
|
install(FILES ${install_list}
|
||||||
DESTINATION ${OPENCV_SAMPLES_SRC_INSTALL_PATH}/gpu
|
DESTINATION ${OPENCV_SAMPLES_SRC_INSTALL_PATH}/gpu
|
||||||
PERMISSIONS OWNER_READ GROUP_READ WORLD_READ COMPONENT samples)
|
PERMISSIONS OWNER_READ GROUP_READ WORLD_READ COMPONENT samples)
|
||||||
|
@ -1,13 +1,4 @@
|
|||||||
#include <iostream>
|
#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
|
#ifdef WIN32
|
||||||
#define WIN32_LEAN_AND_MEAN 1
|
#define WIN32_LEAN_AND_MEAN 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user