Reputation: 239
I am following this tutorial to install OpenCV using CMake for unity. I am stuck on step 6. I have specified the source folder for the source code field in CMake and made a new folder for the target. I have tested all three generator options which are Visual Studio 15 2017, Visual Studio 15 2017 win x64, Visual Studio 15 2017 ARM,
The problem is that I am unable to configure it. It says the following:
The following is the CMakeOutput.log file contents:-
The system is: Windows - 6.1.7601 - AMD64
The following is the CMakeCache.txt file contents:-
> # This is the CMakeCache file.
> # For build in directory: c:/Users/bhism/Downloads/Install
> # It was generated by CMake: D:/software/CMake/cmake-3.9.0-rc5-win64-x64/bin/cmake.exe
> # You can edit this file to change values found and used by cmake.
> # If you do not want to change any of the values, simply exit the editor.
> # If you do want to change a value, simply edit, save, and exit the editor.
> # The syntax for the file is as follows:
> # KEY:TYPE=VALUE
> # KEY is the name of a variable in the cache.
> # TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!.
> # VALUE is the current value for the KEY.
>
> ########################
> # EXTERNAL cache entries
> ########################
>
> //Configs CMAKE_CONFIGURATION_TYPES:STRING=Debug;Release
>
> //Installation Directory
> CMAKE_INSTALL_PREFIX:PATH=C:/Users/bhism/Downloads/Install/install
>
> //Value Computed by CMake CMAKE_PROJECT_NAME:STATIC=OpenCV
>
> //Value Computed by CMake
> OpenCV_BINARY_DIR:STATIC=C:/Users/bhism/Downloads/Install
>
> //Value Computed by CMake
> OpenCV_SOURCE_DIR:STATIC=C:/Users/bhism/Downloads/opencv/sources
>
>
> ########################
> # INTERNAL cache entries
> ########################
>
> //This is the directory where this CMakeCache.txt was created
> CMAKE_CACHEFILE_DIR:INTERNAL=c:/Users/bhism/Downloads/Install //Major
> version of cmake used to create the current loaded cache
> CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3 //Minor version of cmake used to
> create the current loaded cache CMAKE_CACHE_MINOR_VERSION:INTERNAL=9
> //Patch version of cmake used to create the current loaded cache
> CMAKE_CACHE_PATCH_VERSION:INTERNAL=0 //Path to CMake executable.
> CMAKE_COMMAND:INTERNAL=D:/software/CMake/cmake-3.9.0-rc5-win64-x64/bin/cmake.exe
> //Path to cpack program executable.
> CMAKE_CPACK_COMMAND:INTERNAL=D:/software/CMake/cmake-3.9.0-rc5-win64-x64/bin/cpack.exe
> //Path to ctest program executable.
> CMAKE_CTEST_COMMAND:INTERNAL=D:/software/CMake/cmake-3.9.0-rc5-win64-x64/bin/ctest.exe
> //Name of external makefile project generator.
> CMAKE_EXTRA_GENERATOR:INTERNAL= //Name of generator.
> CMAKE_GENERATOR:INTERNAL=Visual Studio 15 2017 ARM //Name of generator
> platform. CMAKE_GENERATOR_PLATFORM:INTERNAL= //Name of generator
> toolset. CMAKE_GENERATOR_TOOLSET:INTERNAL= //Source directory with the
> top level CMakeLists.txt file for this // project
> CMAKE_HOME_DIRECTORY:INTERNAL=C:/Users/bhism/Downloads/opencv/sources
> //number of local generators CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=1
> //Platform information initialized
> CMAKE_PLATFORM_INFO_INITIALIZED:INTERNAL=1 //Path to CMake
> installation.
> CMAKE_ROOT:INTERNAL=D:/software/CMake/cmake-3.9.0-rc5-win64-x64/share/cmake-3.9
The actual error message:-
CMake Deprecation Warning at CMakeLists.txt:72 (cmake_policy):
The OLD behavior for policy CMP0020 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
CMake Deprecation Warning at CMakeLists.txt:76 (cmake_policy):
The OLD behavior for policy CMP0022 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
CMake Deprecation Warning at CMakeLists.txt:81 (cmake_policy):
The OLD behavior for policy CMP0026 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
CMake Error at CMakeLists.txt:98 (project):
Failed to run MSBuild command:
MSBuild.exe
to get the value of VCTargetsPath:
Configuring incomplete, errors occurred!
See also "C:/Users/bhism/Downloads/Install/CMakeFiles/CMakeOutput.log".
Upvotes: 0
Views: 2762
Reputation: 239
I got tired of searching for the solution to this error yesterday. So, decided to started afresh for the day. Uninstalled all components. Downloaded all components again. Tried again. Within the third or fourth tweak, I worked like there wasn't any problem at at. This problem is solved now thanks
Upvotes: 1