opencv cmake警告含义:CMakeLists.txt:1066(包含)

l2osamch  于 2022-11-15  发布在  其他
关注(0)|答案(2)|浏览(325)

我现在正在从源代码构建cmake3.13cmake3.13

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)

这个警告是什么意思?在开始构建过程时是否需要仔细解决这个问题?

dohp0rv5

dohp0rv51#

检查文件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")

似乎您的Python路径设置错误

62lalag4

62lalag42#

在Windows中,您必须在环境设置中为python/libs/site-packages设置一个相对路径。因此,在cmake中将PYTHON3_SITE_PACKAGES设置为相对路径,例如%PYTHON_SITE_PACKAGES%。
并记住以管理员身份运行cmake / visual studio。

相关问题