In case OPENCV_INCLUDE_INSTALL_PATH is absolute (i.e. starts with a "/"),
the path ends up with a double "/".
While this is mostly equivalent to a single slash, it may have a nasty
side effect when:
- OpenCV_INSTALL_PATH is empty
- OPENCV_INCLUDE_INSTALL_PATH is "/usr/include"
- the calling build script uses "-isystem" to specify the path to the
headers of dependencies (to avoid warnings)
Specifying "-isystem /usr/include" breaks the path ordering, and GCC can
no longer find its "stdlib.h", thus CMake filters such statements.
Unfortunately it fails to do so when using "//usr/include".
- removed OpenCV_LIB_DIR* vars (they are broken and not required anymore)
- OpenCVConfig.cmake doesn't contain ANDROID/CUDA code if there is no such support
- removed OpenCV2_INCLUDE_DIRS_CONFIGCMAKE, merged into OpenCV_INCLUDE_DIRS_CONFIGCMAKE
- fix hard-coded relative paths for OpenCV_INSTALL_PATH
- removed OpenCV_TBB_ARCH
- switch OpenCVConfig.cmake into 2-level mode for Android SDK
If it's followed by a slash and OpenCV_INSTALL_BINARIES_PREFIX is empty,
then the resulting path becomes absolute.
Fixes <http://code.opencv.org/issues/3350>.
Symptoms:
CMake Error at CMakeLists.txt:10 (add_executable):
Target "my_app" links to item "C:/Program Files " which has leading
or trailing whitespace. This is now an error according to policy CMP0004.
This problem occurs when building on Windows when we depend on libraries located (for example) in "C:\Program Files (x86)..."
* fix path to libraries in Android SDK
* allow to link to opencv_java.so as Android.mk does
To link to opencv_java.so you can either change your cmake to find OpenCV as
find_package(OpenCV opencv_java)
or pass -DOpenCV_FIND_COMPONENTS=opencv_java to your cmake command
[~] Automatically tracked dependencies between modules
[+] Support for optional module dependencies
[+] Options to choose modules to build
[~] Removed hardcoded modules lists from OpenCVConfig.cmake, opencv.pc and OpenCV.mk
[+] Added COMPONENTS support for FIND_PACKAGE(OpenCV)
[~] haartraining and traincascade are moved outside of modules folder since they aren't the modules