From f40ffe476390689fc429955ed9936a841d28d10c Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Wed, 12 Feb 2014 10:29:53 +0400 Subject: [PATCH] LICENSE and README files installation rules added. (cherry picked from commit e55f2b26028a5261806fb8e972b6165c40593357) --- CMakeLists.txt | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 392c87dee7..a54479d001 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -596,6 +596,28 @@ if(INSTALL_TESTS AND OPENCV_TEST_DATA_PATH AND UNIX) endif() endif() +if(NOT OPENCV_README_FILE) + if(ANDROID) + set(OPENCV_README_FILE ${CMAKE_CURRENT_SOURCE_DIR}/platforms/android/README.android) + endif() +endif() + +if(NOT OPENCV_LICENSE_FILE) + set(OPENCV_LICENSE_FILE ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE) +endif() + +# for UNIX it does not make sense as LICENSE and readme will be part of the package automatically +if(ANDROID OR NOT UNIX) + install(FILES ${OPENCV_LICENSE_FILE} + PERMISSIONS OWNER_READ GROUP_READ WORLD_READ + DESTINATION ${CMAKE_INSTALL_PREFIX} COMPONENT libs) + if(OPENCV_README_FILE) + install(FILES ${OPENCV_README_FILE} + PERMISSIONS OWNER_READ GROUP_READ WORLD_READ + DESTINATION ${CMAKE_INSTALL_PREFIX} COMPONENT libs) + endif() +endif() + # ---------------------------------------------------------------------------- # Summary: # ----------------------------------------------------------------------------