Qt之CTK(编译)

CTK Qt5编译

问题一:“CMake Error at CMake/ctkMacroSetupQt.cmake:81(message):error: Qt4 was not found on your system. You probably need to set the QT_QMAKE_EXECUTABLE variable Call Stack (most recent call first): CMakeLists.txt:410 (ctkMacroSetupQt)”问题解决

CTK/CMake/ctkMacroSetupQt.cmake文件中手动修改,将set_property(CACHE CTK_QT_VERSION PROPERTY STRINGS 4 5)改成set_property(CACHE CTK_QT_VERSION PROPERTY STRINGS 5 4),这样CMake在Configure时会默认选中QT5版本,如果在修改后还是出现上述错误,则同时将set(CTK_QT_VERSION “4” CACHE STRING “Expected Qt version”)改为set(CTK_QT_VERSION “5” CACHE STRING “Expected Qt version”)

问题二:安装时"file cannot create directory: C:/Program Files (x86)/CTK/lib/ctk-0.1/CMake" 问题

CMAKE_INSTALL_PREFIX 项,其默认值为 C:/Program Files (x86)/CTK。修改安装配置就行

问题三:安装时,vs2019, setlocal命令无法有问题

以管理员身份运行VS

参考

  • install那部分不起作用
  • 修改camke相关文件

你可能感兴趣的:(Qt之CTK)