From 628076b7da02720752fb90d41563267d1257e838 Mon Sep 17 00:00:00 2001 From: Andrey Kamaev Date: Sun, 11 Mar 2012 15:22:38 +0000 Subject: [PATCH] Fixed broken headers install layout --- cmake/OpenCVModule.cmake | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cmake/OpenCVModule.cmake b/cmake/OpenCVModule.cmake index f9ce195ea..699808c30 100644 --- a/cmake/OpenCVModule.cmake +++ b/cmake/OpenCVModule.cmake @@ -426,8 +426,11 @@ macro(ocv_create_module) # only "public" headers need to be installed if(OPENCV_MODULE_${the_module}_HEADERS AND OPENCV_MODULES_PUBLIC MATCHES "(^|;)${the_module}(;|$)") - install(FILES ${OPENCV_MODULE_${the_module}_HEADERS} - DESTINATION ${OPENCV_INCLUDE_PREFIX}/opencv2/${name} COMPONENT main) + foreach(hdr ${OPENCV_MODULE_${the_module}_HEADERS}) + if(hdr MATCHES "(opencv2/.*)/[^/]+.h(..)?$") + install(FILES ${hdr} DESTINATION "${OPENCV_INCLUDE_PREFIX}/${CMAKE_MATCH_1}" COMPONENT main) + endif() + endforeach() endif() endmacro()