我按照此处的说明设置OpenCV for Java开发。 http://docs.opencv.org/trunk/doc/tutorials/introduction/desktop_java/java_dev_intro.html。 我使用Mac OS X 10.10.1和Java 1.8.0_25。
我无法将Java添加到"要构建" list使用cmake,这是创建Java开发所需的Java链接本机库和jar文件的先决条件。
我得到的警告如下。我不知道如何解释这个输出,我不明白我是否需要回应警告。错误中没有提到Java。任何人都可以帮助我超越这个阶段吗?
[注意:我在OpenCV论坛上问过这个问题,但没有得到答复。]
CMake Warning (dev) at apps/haartraining/CMakeLists.txt:37 (add_library): Policy CMP0038 is not set: Targets may not link directly to themselves. Run "cmake --help-policy CMP0038" for policy details. Use the cmake_policy command to set the policy and suppress this warning.
Target "opencv_haartraining_engine" links to itself. This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) at apps/haartraining/CMakeLists.txt:37 (add_library): Policy CMP0038 is not set: Targets may not link directly to themselves. Run "cmake --help-policy CMP0038" for policy details. Use the cmake_policy command to set the policy and suppress this warning.
Target "opencv_haartraining_engine" links to itself. This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) at apps/haartraining/CMakeLists.txt:37 (add_library): Policy CMP0038 is not set: Targets may not link directly to themselves. Run "cmake --help-policy CMP0038" for policy details. Use the cmake_policy command to set the policy and suppress this warning.
Target "opencv_haartraining_engine" links to itself. This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) at apps/haartraining/CMakeLists.txt:37 (add_library): Policy CMP0038 is not set: Targets may not link directly to themselves. Run "cmake --help-policy CMP0038" for policy details. Use the cmake_policy command to set the policy and suppress this warning.
Target "opencv_haartraining_engine" links to itself. This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) at apps/haartraining/CMakeLists.txt:37 (add_library): Policy CMP0038 is not set: Targets may not link directly to themselves. Run "cmake --help-policy CMP0038" for policy details. Use the cmake_policy command to set the policy and suppress this warning.
Target "opencv_haartraining_engine" links to itself. This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) at apps/haartraining/CMakeLists.txt:37 (add_library): Policy CMP0038 is not set: Targets may not link directly to themselves. Run "cmake --help-policy CMP0038" for policy details. Use the cmake_policy command to set the policy and suppress this warning.
Target "opencv_haartraining_engine" links to itself. This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) at apps/haartraining/CMakeLists.txt:37 (add_library): Policy CMP0038 is not set: Targets may not link directly to themselves. Run "cmake --help-policy CMP0038" for policy details. Use the cmake_policy command to set the policy and suppress this warning.
Target "opencv_haartraining_engine" links to itself. This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) at apps/haartraining/CMakeLists.txt:37 (add_library): Policy CMP0038 is not set: Targets may not link directly to themselves. Run "cmake --help-policy CMP0038" for policy details. Use the cmake_policy command to set the policy and suppress this warning.
Target "opencv_haartraining_engine" links to itself. This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) at apps/haartraining/CMakeLists.txt:37 (add_library): Policy CMP0038 is not set: Targets may not link directly to themselves. Run "cmake --help-policy CMP0038" for policy details. Use the cmake_policy command to set the policy and suppress this warning.
Target "opencv_haartraining_engine" links to itself. This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) at apps/haartraining/CMakeLists.txt:37 (add_library): Policy CMP0038 is not set: Targets may not link directly to themselves. Run "cmake --help-policy CMP0038" for policy details. Use the cmake_policy command to set the policy and suppress this warning.
Target "opencv_haartraining_engine" links to itself. This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev): Policy CMP0042 is not set: MACOSX_RPATH is enabled by default. Run "cmake --help-policy CMP0042" for policy details. Use the cmake_policy command to set the policy and suppress this warning.
MACOSX_RPATH is not specified for the following targets:
opencv_python
This warning is for project developers. Use -Wno-dev to suppress it.
答案 0 :(得分:0)