mirror of
https://github.com/opencv/opencv.git
synced 2024-11-24 03:00:14 +08:00
samples(gpu): fix build (invalid access to cvconfig.h from sample)
via find_package(OpenCV)
This commit is contained in:
parent
51cfa51924
commit
8484c8af7c
@ -90,6 +90,12 @@ if(BUILD_EXAMPLES AND OCV_DEPENDENCIES_FOUND)
|
||||
list(REMOVE_ITEM all_samples "driver_api_multi.cpp")
|
||||
list(REMOVE_ITEM all_samples "driver_api_stereo_multi.cpp")
|
||||
endif()
|
||||
if(NOT HAVE_CUDA
|
||||
OR NOT HAVE_TBB
|
||||
OR OpenCV_FOUND # via find_package() there is no access to cvconfig.h
|
||||
)
|
||||
list(REMOVE_ITEM all_samples "pyrlk_optical_flow_multithreading.cpp")
|
||||
endif()
|
||||
|
||||
foreach(sample_filename ${all_samples})
|
||||
get_filename_component(sample ${sample_filename} NAME_WE)
|
||||
@ -111,6 +117,9 @@ if (OCV_DEPENDENCIES_FOUND AND INSTALL_C_EXAMPLES AND NOT WIN32)
|
||||
list_filterout(install_list ".*driver_api_multi.cpp")
|
||||
list_filterout(install_list ".*driver_api_stereo_multi.cpp")
|
||||
endif()
|
||||
if(NOT HAVE_CUDA OR NOT HAVE_TBB)
|
||||
list(REMOVE_ITEM install_list "pyrlk_optical_flow_multithreading.cpp")
|
||||
endif()
|
||||
install(FILES ${install_list}
|
||||
DESTINATION "${OPENCV_SAMPLES_SRC_INSTALL_PATH}/gpu"
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ COMPONENT samples)
|
||||
|
Loading…
Reference in New Issue
Block a user