1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-21 19:33:03 +04:00

Install: added prebuilt samples installation

This commit is contained in:
Maksim Shabunin
2020-09-08 20:22:26 +03:00
parent 6b674709b8
commit 2dff2f36bf
3 changed files with 9 additions and 4 deletions
+6 -2
View File
@@ -15,8 +15,12 @@ function(ocv_define_sample out_target source sub)
if(WIN32 AND MSVC AND NOT BUILD_SHARED_LIBS)
set_target_properties(${the_target} PROPERTIES LINK_FLAGS "/NODEFAULTLIB:atlthunk.lib /NODEFAULTLIB:atlsd.lib /DEBUG")
endif()
if(WIN32)
install(TARGETS ${the_target} RUNTIME DESTINATION "samples/${sub}" COMPONENT samples)
# Should be usable in stand-alone build scenario
if((NOT DEFINED INSTALL_BIN_EXAMPLES AND WIN32) OR INSTALL_BIN_EXAMPLES)
if(NOT DEFINED OPENCV_SAMPLES_BIN_INSTALL_PATH)
set(OPENCV_SAMPLES_BIN_INSTALL_PATH "samples")
endif()
install(TARGETS ${the_target} RUNTIME DESTINATION "${OPENCV_SAMPLES_BIN_INSTALL_PATH}/${sub}" COMPONENT samples)
endif()
# Add single target to build all samples in the group: 'make opencv_samples_cpp'
set(parent_target opencv_samples_${sub})