install new headers like "opencv2/core.hpp"
authora-andre <aandre@tu-chemnitz.eu>
Sun, 2 Aug 2015 11:13:58 +0000 (13:13 +0200)
committera-andre <aandre@tu-chemnitz.eu>
Sun, 2 Aug 2015 11:13:58 +0000 (13:13 +0200)
cmake/OpenCVModule.cmake

index a700657..ec834d9 100644 (file)
@@ -488,7 +488,7 @@ macro(ocv_glob_module_sources)
 
   file(GLOB_RECURSE lib_srcs "src/*.cpp")
   file(GLOB_RECURSE lib_int_hdrs "src/*.hpp" "src/*.h")
-  file(GLOB lib_hdrs "include/opencv2/${name}/*.hpp" "include/opencv2/${name}/*.h")
+  file(GLOB lib_hdrs "include/opencv2/*.hpp" "include/opencv2/${name}/*.hpp" "include/opencv2/${name}/*.h")
   file(GLOB lib_hdrs_detail "include/opencv2/${name}/detail/*.hpp" "include/opencv2/${name}/detail/*.h")
   file(GLOB_RECURSE lib_srcs_apple "src/*.mm")
   if (APPLE)
@@ -629,7 +629,7 @@ macro(ocv_create_module)
   if(OPENCV_MODULE_${the_module}_HEADERS AND ";${OPENCV_MODULES_PUBLIC};" MATCHES ";${the_module};")
     foreach(hdr ${OPENCV_MODULE_${the_module}_HEADERS})
       string(REGEX REPLACE "^.*opencv2/" "opencv2/" hdr2 "${hdr}")
-      if(hdr2 MATCHES "^(opencv2/.*)/[^/]+.h(..)?$")
+      if(hdr2 MATCHES "^(opencv2/?.*)/[^/]+.h(..)?$")
         install(FILES ${hdr} DESTINATION "${OPENCV_INCLUDE_INSTALL_PATH}/${CMAKE_MATCH_1}" COMPONENT dev)
       endif()
     endforeach()