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

cmake: fix licenses install rules

This commit is contained in:
Alexander Alekhin
2019-04-02 17:47:03 +03:00
parent 69ff7a76d6
commit 4fa4bef41d
5 changed files with 22 additions and 6 deletions
+6 -1
View File
@@ -245,7 +245,12 @@ if(NOT DEFINED IPPROOT)
return()
endif()
set(IPPROOT "${ICV_PACKAGE_ROOT}/icv")
ocv_install_3rdparty_licenses(ippicv "${IPPROOT}/readme.htm" "${ICV_PACKAGE_ROOT}/EULA.txt")
ocv_install_3rdparty_licenses(ippicv "${IPPROOT}/readme.htm")
if(WIN32)
ocv_install_3rdparty_licenses(ippicv "${ICV_PACKAGE_ROOT}/EULA.rtf")
else()
ocv_install_3rdparty_licenses(ippicv "${ICV_PACKAGE_ROOT}/EULA.txt")
endif()
endif()
file(TO_CMAKE_PATH "${IPPROOT}" __IPPROOT)
+5 -1
View File
@@ -148,9 +148,13 @@ if(BUILD_IPP_IW)
set(IPPIW_ROOT "${IPPROOT}/../iw")
ocv_install_3rdparty_licenses(ippiw
"${IPPIW_ROOT}/../EULA.txt"
"${IPPIW_ROOT}/../support.txt"
"${IPPIW_ROOT}/../third-party-programs.txt")
if(WIN32)
ocv_install_3rdparty_licenses(ippiw "${IPPIW_ROOT}/../EULA.rtf")
else()
ocv_install_3rdparty_licenses(ippiw "${IPPIW_ROOT}/../EULA.txt")
endif()
# Package sources
get_filename_component(__PATH "${IPPROOT}/../iw/" ABSOLUTE)
+7 -3
View File
@@ -1200,13 +1200,17 @@ endfunction()
# ocv_install_3rdparty_licenses(<library-name> <filename1> [<filename2> ..])
function(ocv_install_3rdparty_licenses library)
foreach(filename ${ARGN})
set(filepath "${filename}")
if(NOT IS_ABSOLUTE "${filepath}")
set(filepath "${CMAKE_CURRENT_LIST_DIR}/${filepath}")
endif()
get_filename_component(name "${filename}" NAME)
install(
FILES "${filename}"
DESTINATION "${OPENCV_OTHER_INSTALL_PATH}/licenses"
FILES "${filepath}"
DESTINATION "${OPENCV_LICENSES_INSTALL_PATH}"
COMPONENT licenses
RENAME "${library}-${name}"
OPTIONAL)
)
endforeach()
endfunction()