Add the installation prefix of “Qt5Widgets” to CMAKE_PREFIX_PATH

后端 未结 5 1635
暗喜
暗喜 2020-12-14 15:08

I don\'t know a lot about cmake, I\'m trying to build a client using cmake and Qt. Getting the following error:

CMake Error at alethzero/CMakeLists.tx

相关标签:
5条回答
  • 2020-12-14 15:37

    at an Ubuntu 16.04.4 LTS desktop the solution was

    cmake .. -DMAKE_PREFIX_PATH=/usr/include/x86_64-linux-gnu/qt5
    
    0 讨论(0)
  • 2020-12-14 15:39

    I needed this on my macOS after Qt installation with brew install qt5:

    export CMAKE_PREFIX_PATH=/usr/local/Cellar/qt5/5.7.0/
    
    0 讨论(0)
  • 2020-12-14 15:53

    For ubuntu: cmake -DCMAKE_PREFIX_PATH=/home/ryan/Qt/5.11.2/gcc_64 ..

    /home/ryan/Qt/ is the Qt installation root path

    0 讨论(0)
  • 2020-12-14 15:54

    Well, here you have a solution for Windows: How to find qt5 CMake module on windows

    set (CMAKE_PREFIX_PATH "C:\\Qt\\Qt5.0.1\\5.0.1\\msvc2010\\")
    

    For your environment, I think you will have to change the path where Qt is located...

    Maybe this will help you:
    https://github.com/Cockatrice/Cockatrice/issues/205

    0 讨论(0)
  • 2020-12-14 15:58

    This is documented:

    http://doc.qt.io/qt-5/cmake-manual.html

    The easiest way to use CMake is to set the CMAKE_PREFIX_PATH 
    environment variable to the install prefix of Qt 5
    

    Do this

    export CMAKE_PREFIX_PATH=/home/user/Programs/<other_stuff>
    

    where references the compiler etc, so that this complete path is valid:

    /home/user/Programs/<other_stuff>/bin/qmake*
    
    0 讨论(0)
提交回复
热议问题