Multiple fixes for tests deb package build.
Added opencv_testing.sh.in file; opencv_testing.sh installation guarded by OS check.
This commit is contained in:
parent
7a0a9d010b
commit
d9dc5ffa91
@ -561,6 +561,13 @@ include(cmake/OpenCVGenConfig.cmake)
|
|||||||
# Generate Info.plist for the IOS framework
|
# Generate Info.plist for the IOS framework
|
||||||
include(cmake/OpenCVGenInfoPlist.cmake)
|
include(cmake/OpenCVGenInfoPlist.cmake)
|
||||||
|
|
||||||
|
# Generate environment setup file
|
||||||
|
if(INSTALL_TESTS AND OPENCV_TEST_DATA_PATH AND UNIX AND NOT ANDROID)
|
||||||
|
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()
|
||||||
|
|
||||||
# ----------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------
|
||||||
# Summary:
|
# Summary:
|
||||||
# ----------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------
|
||||||
|
@ -56,12 +56,6 @@ set(CPACK_DEB_COMPONENT_INSTALL TRUE)
|
|||||||
set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
|
set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
|
||||||
set(CPACK_DEBIAN_PACKAGE_SECTION "libs")
|
set(CPACK_DEBIAN_PACKAGE_SECTION "libs")
|
||||||
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "http://opencv.org")
|
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/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
|
#depencencies
|
||||||
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS TRUE)
|
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS TRUE)
|
||||||
|
2
cmake/templates/opencv_testing.sh.in
Normal file
2
cmake/templates/opencv_testing.sh.in
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Environment setup for OpenCV testing
|
||||||
|
export OPENCV_TEST_DATA_PATH=@CMAKE_INSTALL_PREFIX@/share/OpenCV/testdata
|
@ -9,10 +9,10 @@ elseif(NOT WIN32)
|
|||||||
install(FILES ${LBP_CASCADES} DESTINATION share/OpenCV/lbpcascades COMPONENT libs)
|
install(FILES ${LBP_CASCADES} DESTINATION share/OpenCV/lbpcascades COMPONENT libs)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (OPENCV_TEST_DATA_PATH)
|
if(INSTALL_TESTS AND OPENCV_TEST_DATA_PATH)
|
||||||
if(ANDROID)
|
if(ANDROID)
|
||||||
install(FILES ${OPENCV_TEST_DATA_PATH} DESTINATION sdk/etc/testdata COMPONENT tests)
|
install(DIRECTORY ${OPENCV_TEST_DATA_PATH} DESTINATION sdk/etc/testdata COMPONENT tests)
|
||||||
elseif(NOT WIN32)
|
elseif(NOT WIN32)
|
||||||
install(FILES ${OPENCV_TEST_DATA_PATH} DESTINATION share/OpenCV/testdata COMPONENT tests)
|
install(DIRECTORY ${OPENCV_TEST_DATA_PATH} DESTINATION share/OpenCV/testdata COMPONENT tests)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
Loading…
Reference in New Issue
Block a user