New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmake: update install paths (Linux) #12401
Conversation
Maybe we should break |
"opencv4" will not be used in source codes. Users still using "opencv2/core.hpp" (no any changes are required if using CMake)
Right. This will allow smooth transition from "opencv2". Both lines would have the same effect:
|
Is the impact of this change documented anywhere for code not using cmake? Is the recommended solution to do a "ln -s /usr/local/include/opencv4/opencv2/ /usr/local/include/opencv2"? We normally create docker images for building inside so being able to have side-by-side installations is not something that we want to take advantage of and it appears to break all existing software that doesnt use cmake for building as the include path changed and there is no desire for us to update all our build files with a new include path for no good reason. I tried looking at the documentation but did not find the 'breaking' change mentioned anywhere but maybe I missed it. I found multiple people that resorted to the "ln" solution which is why I wanted to ask if its the recommended way to deal with this. |
Recommended way is using of CMake's |
I asked what is the recommended way for people not using cmake. |
this commit a956732 |
@sergiomb2 , set the OPENCV_PC_FILE_NAME option to whatever you need. |
thank you for reply mshabunin after move opencv4.pc to opencv.pc if not packages aren't found . nomacs don't complie [3] with error: 'CV_DIST_C' was not declared in this scope , was C API deleted ? Thanks I have to go now [1] [3] |
C-API was not deleted yet, but all inclusions have been removed from default headers, so now one needs to directly include "opencv2/imgproc/types_c.h" and other
Not sure why opencv.pc was not found by gmic, I can see I've found gmic/src/Makefile contains block:
which adds wrong compiler options: While gmic/CMakeLists.txt has better block:
which should work correctly if OpenCV can not be found. Is it possible to build gmic using cmake? Where should all .pc files be located on Fedora? |
C API (from OpenCV 1.0) has been deprecated since OpenCV 2.4. It is not tested for years with C compiler. Mentioned headers keep legacy C API constants only (for apps which are not migrated on C++ enums for some reasons). Some part of legacy C API functions are gone (left functions/structures will be removed without notice during future OpenCV 4.x releases). More info/links about C API is here: #11000
This all-in-one header is deprecated.
|
Improve support for side-by-side installations (multiple major versions).
Improve conformance with Linux/GNU installation layout.
Details:
/usr/include/opencv4/
(no changes in applications are required if CMake is used).opencv4.pc
All paths are still configurable.