mirror of
https://github.com/opencv/opencv.git
synced 2025-06-10 02:53:07 +08:00
Merge pull request #13253 from alalek:fix_13201
* cmake: install 'legacy/constants_c.h' files * samples: add compatibility test code
This commit is contained in:
parent
a518e7063d
commit
c0016d7fe9
@ -779,6 +779,7 @@ macro(ocv_glob_module_sources)
|
||||
"${CMAKE_CURRENT_LIST_DIR}/include/opencv2/${name}/hal/*.h"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/include/opencv2/${name}/utils/*.hpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/include/opencv2/${name}/utils/*.h"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/include/opencv2/${name}/legacy/*.h"
|
||||
)
|
||||
file(GLOB lib_hdrs_detail
|
||||
"${CMAKE_CURRENT_LIST_DIR}/include/opencv2/${name}/detail/*.hpp"
|
||||
@ -1011,6 +1012,8 @@ macro(_ocv_create_module)
|
||||
string(REGEX REPLACE "^.*opencv2/" "opencv2/" hdr2 "${hdr}")
|
||||
if(NOT hdr2 MATCHES "private" AND hdr2 MATCHES "^(opencv2/?.*)/[^/]+.h(..)?$" )
|
||||
install(FILES ${hdr} OPTIONAL DESTINATION "${OPENCV_INCLUDE_INSTALL_PATH}/${CMAKE_MATCH_1}" COMPONENT dev)
|
||||
else()
|
||||
#message("Header file will be NOT installed: ${hdr}")
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
@ -102,6 +102,7 @@ file(GLOB imgcodecs_ext_hdrs
|
||||
"${CMAKE_CURRENT_LIST_DIR}/include/opencv2/*.hpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/include/opencv2/${name}/*.hpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/include/opencv2/${name}/*.h"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/include/opencv2/${name}/legacy/*.h"
|
||||
)
|
||||
|
||||
if(IOS)
|
||||
|
@ -32,7 +32,9 @@ set(videoio_srcs
|
||||
file(GLOB videoio_ext_hdrs
|
||||
"${CMAKE_CURRENT_LIST_DIR}/include/opencv2/*.hpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/include/opencv2/${name}/*.hpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/include/opencv2/${name}/*.h")
|
||||
"${CMAKE_CURRENT_LIST_DIR}/include/opencv2/${name}/*.h"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/include/opencv2/${name}/legacy/*.h"
|
||||
)
|
||||
|
||||
# Removing WinRT API headers by default
|
||||
list(REMOVE_ITEM videoio_ext_hdrs "${CMAKE_CURRENT_LIST_DIR}/include/opencv2/${name}/cap_winrt.hpp")
|
||||
|
@ -0,0 +1,19 @@
|
||||
#include <iostream>
|
||||
|
||||
#include <opencv2/core.hpp>
|
||||
|
||||
#include <opencv2/imgcodecs/legacy/constants_c.h>
|
||||
#include <opencv2/videoio/legacy/constants_c.h>
|
||||
#include <opencv2/photo/legacy/constants_c.h>
|
||||
#include <opencv2/video/legacy/constants_c.h>
|
||||
|
||||
using namespace cv;
|
||||
|
||||
int main(int /*argc*/, const char** /*argv*/)
|
||||
{
|
||||
std::cout
|
||||
<< (int)CV_LOAD_IMAGE_GRAYSCALE
|
||||
<< (int)CV_CAP_FFMPEG
|
||||
<< std::endl;
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user