Recently I am tring to build OpenCV4 use cmake and vs2019 in Windows, but when I configure something, I got the following ERROR:
CMake Warning at cmake/OpenCVGenSetupVars.cmake:54 (message):
CONFIGURATION IS NOT SUPPORTED: validate setupvars script in install
directory
Call Stack (most recent call first):
CMakeLists.txt:1059 (include)
I check the file OpenCVGenSetupVars.cmake:54 and find these:
if(IS_ABSOLUTE "${__python_path}")
set(OPENCV_PYTHON_DIR_RELATIVE_CMAKECONFIG "${__python_path}")
message(WARNING "CONFIGURATION IS NOT SUPPORTED: validate setupvars script in install directory")
But my "python_path" is right, and I have no idea. Do you know what should I to do ?
I had the same problem. The compilation was still successful after ignoring this warning. So the second time I built it, I removed the configuration option(OPENCV_GENERATE_SETUPVARS).
Related
I am using Windows and using the CMake GUI. In CMake, I set the source code path at
C:/Users/me/Downloads/opencv
opencv and opencv_contribwere obtained from the OpenCV github repos
I set the build path in Cmake as C:/Users/me/Downloads/builds/opencv
I then set OPENCV_EXTRA_MODULES_PATH as C:/Users/me/Downloads/opencv-3.4/source/opencv_contrib/modules and checked WITH_CUDA
after Configuring, I get the error:
CMake Error at cmake/OpenCVDetectCUDA.cmake:125 (string):
string sub-command REPLACE requires at least four arguments.
Call Stack (most recent call first):
cmake/OpenCVDetectCUDA.cmake:174 (ocv_wipeout_deprecated)
cmake/OpenCVFindLibsPerf.cmake:43 (include)
CMakeLists.txt:688 (include)
can anyone help with this?
I am now building from source the opencv4.1.0 with cmake3.13. The cmake configuration gives a warning message saying:
CMake Warning at cmake/OpenCVGenSetupVars.cmake:54 (message):
CONFIGURATION IS NOT SUPPORTED: validate setupvars script in install
directory
Call Stack (most recent call first):
CMakeLists.txt:1066 (include)
What does this warning mean? Does that need be carefully addressed for starting the building process?
check the file cmake/OpenCVGenSetupVars.cmake
if(DEFINED __python_path)
if(IS_ABSOLUTE "${__python_path}")
set(OPENCV_PYTHON_DIR_RELATIVE_CMAKECONFIG "${__python_path}")
message(WARNING "CONFIGURATION IS NOT SUPPORTED: validate setupvars script in install directory")
It seems like you have set your Python path wrong
In windows you have to make an relative path in environtment settings to python/libs/site-packages. So in cmake set PYTHON3_SITE_PACKAGES to the relative path e.g %PYTHON_SITE_PACKAGES%.
And remember to run cmake / visual studio as administrator.
I am developing a formula that uses a CMake step to generate build files. During this I encounter the following error:
CMake Error at /usr/local/Cellar/cmake/3.11.4/share/cmake/Modules/CPack.cmake:441 (message):
CPack license resource file: "/tmp/myformula-20180615-53709-m1sfii/LICENSE.txt"
could not be found.
Call Stack (most recent call first):
/usr/local/Cellar/cmake/3.11.4/share/cmake/Modules/CPack.cmake:446 (cpack_check_file_exists)
CMakeModules/installer.cmake:49 (include)
CMakeLists.txt:219 (include)
I checked the temporary directory to see that LICENSE.txt is in fact missing. Browsing the brew source code I saw that brew considers this a Metafile. Is it filtered out? How can I prevent it?
I think CPack is just looking for a licence.txt, that is provided by yourself.
So either:
You can create a license file and use:
set (CPACK_RESOURCE_FILE_LICENSE
"${CMAKE_CURRENT_SOURCE_DIR}/License.txt")
Where you, of course, need to set CMAKE_CURRENT_SOURCE_DIR, or just hardcode for your preferred folder for while testing.
If you don't care of license, just don't set CPACK_RESOURCE_FILE_LICENSE. Packing shall be successful with a license warning.
i would like to install my ZED Camera from Stereolabs. Iwas following each step precisely (https://www.stereolabs.com/documentation/overview/getting-started/application-development.html#installation) but it didn't work. From the errorlog it says, that the path of the config and directory is wrong. So I put it manually but still going to the wrong file and directory.Errorlog and my configuration
CMake Warning at C:/Program Files (x86)/ZED SDK/dependencies/opencv_3.1.0/OpenCVConfig.cmake:166 (message):
Found OpenCV Windows Pack but it has no binaries compatible with your
configuration.
You should manually point CMake variable OpenCV_DIR to your build of OpenCV
library.
Call Stack (most recent call first):
CMakeLists.txt:41 (find_package)
CMake Error at CMakeLists.txt:41 (find_package):
Found package configuration file:
C:/Program Files (x86)/ZED SDK/dependencies/opencv_3.1.0/OpenCVConfig.cmake
but it set OpenCV_FOUND to FALSE so package "OpenCV" is considered to be
NOT FOUND.
Thanks for any help!
Horst
I'm trying to compile a project with CMake. I'm getting an error:
Found OpenCV Windows Pack but it has not binaries compatible with your
configuration.
You should manually point CMake variable OpenCV_DIR to your build of OpenCV
library.
Call Stack (most recent call first):
CMakeLists.txt:9 (FIND_PACKAGE)
CMake Error at CMakeLists.txt:9 (FIND_PACKAGE):
Found package configuration file:
C:/Users/Ghenja/AppData/Local/opencv/build/OpenCVConfig.cmake
but it set OpenCV_FOUND to FALSE so package "OpenCV" is considered to be
NOT FOUND.
I don't understand what is happening. Please help me to solve this problem.
Clean your project and remove CMakeCache.txt. OpenCV_FOUND is probably cached now.
If that doesn't work, then run your cmake command with additional flags just to be sure:
cmake -DOpenCV_FOUND:BOOL=ON -DOpenCV_DIR=/path/to/your/OpenCV