mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 07:43:03 +04:00
Code review notes fixed.
Env setup for testing package implemented using /etc/profile.d;
Variable with path for all native samples added;
Path for test binaries and test data updated.
(cherry picked from commit 39201e68e2)
This commit is contained in:
@@ -712,11 +712,7 @@ function(ocv_add_perf_tests)
|
||||
# TODO: warn about unsatisfied dependencies
|
||||
endif(OCV_DEPENDENCIES_FOUND)
|
||||
if(INSTALL_TESTS)
|
||||
if(ANDROID)
|
||||
install(TARGETS ${the_target} RUNTIME DESTINATION sdk/etc/bin COMPONENT tests)
|
||||
elseif(NOT WIN32)
|
||||
install(TARGETS ${the_target} RUNTIME DESTINATION share/OpenCV/bin COMPONENT tests)
|
||||
endif()
|
||||
install(TARGETS ${the_target} RUNTIME DESTINATION ${OPENCV_BIN_INSTALL_PATH} COMPONENT tests)
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
@@ -773,11 +769,7 @@ function(ocv_add_accuracy_tests)
|
||||
endif(OCV_DEPENDENCIES_FOUND)
|
||||
|
||||
if(INSTALL_TESTS)
|
||||
if(ANDROID)
|
||||
install(TARGETS ${the_target} RUNTIME DESTINATION sdk/etc/bin COMPONENT tests)
|
||||
elseif(NOT WIN32)
|
||||
install(TARGETS ${the_target} RUNTIME DESTINATION share/OpenCV/bin COMPONENT tests)
|
||||
endif()
|
||||
install(TARGETS ${the_target} RUNTIME DESTINATION ${OPENCV_BIN_INSTALL_PATH} COMPONENT tests)
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
@@ -819,7 +811,7 @@ function(ocv_add_samples)
|
||||
if(INSTALL_C_EXAMPLES AND NOT WIN32 AND EXISTS "${samples_path}")
|
||||
file(GLOB sample_files "${samples_path}/*")
|
||||
install(FILES ${sample_files}
|
||||
DESTINATION share/OpenCV/samples/${module_id}
|
||||
DESTINATION ${OPENCV_SAMPLES_SRC_INSTALL_PATH}/${module_id}
|
||||
PERMISSIONS OWNER_READ GROUP_READ WORLD_READ COMPONENT samples)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
@@ -58,9 +58,9 @@ set(CPACK_DEBIAN_PACKAGE_SECTION "libs")
|
||||
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "http://opencv.org")
|
||||
if(INSTALL_TESTS AND OPENCV_TEST_DATA_PATH)
|
||||
set(prefix "${CMAKE_INSTALL_PREFIX}")
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/templates/postinst"
|
||||
"${CMAKE_BINARY_DIR}/junk/postinst" @ONLY IMMEDIATE)
|
||||
set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_BINARY_DIR}/junk/postinst")
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/templates/opencv_testing.sh.in"
|
||||
"${CMAKE_BINARY_DIR}/unix-install/opencv_testing.sh" @ONLY IMMEDIATE)
|
||||
install(FILES "${CMAKE_BINARY_DIR}/unix-install/opencv_testing.sh" DESTINATION /etc/profile.d/ COMPONENT tests)
|
||||
endif()
|
||||
|
||||
#depencencies
|
||||
@@ -70,9 +70,7 @@ set(CPACK_COMPONENT_dev_DEPENDS libs)
|
||||
set(CPACK_COMPONENT_docs_DEPENDS libs)
|
||||
set(CPACK_COMPONENT_java_DEPENDS libs)
|
||||
set(CPACK_COMPONENT_python_DEPENDS libs)
|
||||
if(INSTALL_TESTS)
|
||||
set(CPACK_COMPONENT_tests_DEPENDS libs)
|
||||
endif()
|
||||
|
||||
if(HAVE_CUDA)
|
||||
string(REPLACE "." "-" cuda_version_suffix ${CUDA_VERSION})
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "export OPENCV_TEST_DATA_PATH=@prefix@/share/OpenCV/testdata" >> /etc/profile
|
||||
Reference in New Issue
Block a user