The imported target "Qt5::Core" references the file

来源:互联网 发布:手机淘宝怎么改运费 编辑:程序博客网 时间:2024/06/10 06:27

CMake Error at /usr/local/lib/cmake/Qt5Core/Qt5CoreConfig.cmake:15 (message):  The imported target "Qt5::Core" references the file     "/usr/local/.//mkspecs/macx-clang"  but this file does not exist.  Possible reasons include:  * The file was deleted, renamed, or moved to another location.  * An install or uninstall procedure did not complete successfully.  * The installation package was faulty and contained     "/usr/local/lib/cmake/Qt5Core/Qt5CoreConfigExtras.cmake"  but not all the files it references.

今天在mac下安装MARSYAS时出现了一个这样的问题。

这个是在安装QT时候没有配置好。我对qt还不是特别熟,只好先暴力解决这个问题。

先找到QtCore的配置文件:

/usr/local/lib/cmake/Qt5Core/Qt5CoreConfig.cmake
然后在下面这行中加入相应的路径。

原始路径:

get_filename_component(_qt5Core_install_prefix "${CMAKE_CURRENT_LIST_DIR}/../../../" ABSOLUTE)

修改后:

get_filename_component(_qt5Core_install_prefix "${CMAKE_CURRENT_LIST_DIR}/../../../Cellar/qt5/5.5.1_2/" ABSOLUTE)


参考 : https://github.com/Homebrew/homebrew/issues/29938




0 0