From 187befd665b504dc6fb16672cc0014a9287d887e Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Thu, 15 Jan 2015 14:48:24 +0300 Subject: [PATCH] Fixed installation of CMakeLists.txt and enabled GPU samples build in stand alone version. --- samples/CMakeLists.txt | 5 ++++- samples/c/CMakeLists.txt | 2 +- samples/cpp/CMakeLists.txt | 2 +- samples/gpu/CMakeLists.txt | 3 +-- samples/gpu/performance/CMakeLists.txt | 2 +- samples/ocl/CMakeLists.txt | 2 +- 6 files changed, 9 insertions(+), 7 deletions(-) diff --git a/samples/CMakeLists.txt b/samples/CMakeLists.txt index 48a419d75c..659ab058c1 100644 --- a/samples/CMakeLists.txt +++ b/samples/CMakeLists.txt @@ -19,6 +19,9 @@ if(ANDROID AND BUILD_ANDROID_EXAMPLES) add_subdirectory(android) endif() +install(FILES "CMakeLists.txt" + DESTINATION ${OPENCV_SAMPLES_SRC_INSTALL_PATH} + PERMISSIONS OWNER_READ GROUP_READ WORLD_READ COMPONENT samples) # # END OF BUILD CASE 1: Build samples with library sources @@ -60,7 +63,7 @@ endif() add_subdirectory(c) add_subdirectory(cpp) add_subdirectory(ocl) -# FIXIT: can't use cvconfig.h in samples: add_subdirectory(gpu) +add_subdirectory(gpu) # # END OF BUILD CASE 2: Build samples with library binaries diff --git a/samples/c/CMakeLists.txt b/samples/c/CMakeLists.txt index 0a74c12041..61f23666f3 100644 --- a/samples/c/CMakeLists.txt +++ b/samples/c/CMakeLists.txt @@ -52,7 +52,7 @@ if(BUILD_EXAMPLES AND OCV_DEPENDENCIES_FOUND) endif() if (OCV_DEPENDENCIES_FOUND AND INSTALL_C_EXAMPLES AND NOT WIN32) - file(GLOB C_SAMPLES *.c *.cpp *.jpg *.png *.data makefile.* build_all.sh *.dsp *.cmd ) + file(GLOB C_SAMPLES *.c *.cpp *.jpg *.png *.data makefile.* build_all.sh *.dsp *.cmd *.txt) install(FILES ${C_SAMPLES} DESTINATION ${OPENCV_SAMPLES_SRC_INSTALL_PATH}/c PERMISSIONS OWNER_READ GROUP_READ WORLD_READ COMPONENT samples) diff --git a/samples/cpp/CMakeLists.txt b/samples/cpp/CMakeLists.txt index ece136552a..65e402bc13 100644 --- a/samples/cpp/CMakeLists.txt +++ b/samples/cpp/CMakeLists.txt @@ -91,7 +91,7 @@ if(BUILD_EXAMPLES AND OCV_DEPENDENCIES_FOUND) endif() if (OCV_DEPENDENCIES_FOUND AND INSTALL_C_EXAMPLES AND NOT WIN32) - file(GLOB C_SAMPLES *.c *.cpp *.jpg *.png *.data makefile.* build_all.sh *.dsp *.cmd ) + file(GLOB C_SAMPLES *.c *.cpp *.jpg *.png *.data makefile.* build_all.sh *.dsp *.cmd *.txt) install(FILES ${C_SAMPLES} DESTINATION ${OPENCV_SAMPLES_SRC_INSTALL_PATH}/cpp PERMISSIONS OWNER_READ GROUP_READ WORLD_READ COMPONENT samples) diff --git a/samples/gpu/CMakeLists.txt b/samples/gpu/CMakeLists.txt index 030283c8ba..dc7464f942 100644 --- a/samples/gpu/CMakeLists.txt +++ b/samples/gpu/CMakeLists.txt @@ -101,8 +101,7 @@ if(BUILD_EXAMPLES AND OCV_DEPENDENCIES_FOUND) 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 ) - message(" install_list: ${install_list}") + file(GLOB install_list *.c *.cpp *.jpg *.png *.data makefile.* build_all.sh *.dsp *.cmd *.txt) if(NOT HAVE_OPENGL) list_filterout(install_list ".*opengl.cpp") endif() diff --git a/samples/gpu/performance/CMakeLists.txt b/samples/gpu/performance/CMakeLists.txt index de0feadd26..4a1603a916 100644 --- a/samples/gpu/performance/CMakeLists.txt +++ b/samples/gpu/performance/CMakeLists.txt @@ -27,7 +27,7 @@ if(WIN32) endif() if(INSTALL_C_EXAMPLES AND NOT WIN32) - file(GLOB GPU_FILES performance/*.cpp performance/*.h) + file(GLOB GPU_FILES performance/*.cpp performance/*.h performance/CMakeLists.txt) install(FILES ${GPU_FILES} DESTINATION ${OPENCV_SAMPLES_SRC_INSTALL_PATH}/gpu/performance PERMISSIONS OWNER_READ GROUP_READ WORLD_READ diff --git a/samples/ocl/CMakeLists.txt b/samples/ocl/CMakeLists.txt index 373774e376..10db9b10fb 100644 --- a/samples/ocl/CMakeLists.txt +++ b/samples/ocl/CMakeLists.txt @@ -52,7 +52,7 @@ if(BUILD_EXAMPLES AND OCV_DEPENDENCIES_FOUND) 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 ) + file(GLOB install_list *.c *.cpp *.jpg *.png *.data makefile.* build_all.sh *.dsp *.cmd *.txt) install(FILES ${install_list} DESTINATION ${OPENCV_SAMPLES_SRC_INSTALL_PATH}/ocl PERMISSIONS OWNER_READ GROUP_READ WORLD_READ COMPONENT samples)