qmlplugindump executable not found.It is required to generate the qmltypes file for VTK Qml

4 篇文章 0 订阅

首先查看此报错信息位置:

/.../VTKSource/GUISupport/QtQuick/qml/CMakeLists.txt

打开文件,查看关联代码段:

# First, find the qmlplugindump executable
get_target_property(qt_qmake_location "Qt${vtk_qt_major_version}::qmake" LOCATION)
get_filename_component(qt_bin_dir "${qt_qmake_location}" PATH)
if (APPLE)
  get_filename_component(qt_bin_dir "${qt_bin_dir}" PATH)
endif ()
find_program(QMLPLUGINDUMP_EXECUTABLE
  NAMES "qmlplugindump-qt${vtk_qt_major_version}" qmlplugindump
  HINTS "${qt_bin_dir}"
  DOC "QmlPlugindump executable location")
mark_as_advanced(QMLPLUGINDUMP_EXECUTABLE)
if (NOT QMLPLUGINDUMP_EXECUTABLE)
  message(FATAL_ERROR
    "qmlplugindump executable not found.\nIt is required to generate the "
    "qmltypes file for VTK Qml plugin.")
endif ()
 

从这里看执行的流程,就是通过 qt_qmake_location 找到 qt_bin_dir ,再从qt_bin_dir 中找 qmlplugindump 这个可执行文件 。 

打开Qt的安装目录,搜索qmlplugindump的可执行文件,找到文件在这里

/Users/.../Qt/5.15.2/clang_64/bin

直接在CMakeList.txt中添加一句,完成之后的代码段:

# First, find the qmlplugindump executable
get_target_property(qt_qmake_location "Qt${vtk_qt_major_version}::qmake" LOCATION)
get_filename_component(qt_bin_dir "${qt_qmake_location}" PATH)
if (APPLE)
  get_filename_component(qt_bin_dir "${qt_bin_dir}" PATH)
endif ()
set( qt_bin_dir "/Users/allen/Soft/Qt/5.15.2/clang_64/bin/" )
find_program(QMLPLUGINDUMP_EXECUTABLE
  NAMES "qmlplugindump-qt${vtk_qt_major_version}" qmlplugindump
  HINTS "${qt_bin_dir}"
  DOC "QmlPlugindump executable location")
mark_as_advanced(QMLPLUGINDUMP_EXECUTABLE)
if (NOT QMLPLUGINDUMP_EXECUTABLE)
  message(FATAL_ERROR
    "qmlplugindump executable not found.\nIt is required to generate the "
    "qmltypes file for VTK Qml plugin.")
endif ()
 

然后继续configure -- generate -- make 即可。

遇到什么问题,直接找到问题相关的代码,然后从源头进行解决即可。

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值