• <tfoot id='Zv5Wu'></tfoot>

      <small id='Zv5Wu'></small><noframes id='Zv5Wu'>

        <bdo id='Zv5Wu'></bdo><ul id='Zv5Wu'></ul>
      <legend id='Zv5Wu'><style id='Zv5Wu'><dir id='Zv5Wu'><q id='Zv5Wu'></q></dir></style></legend>
      1. <i id='Zv5Wu'><tr id='Zv5Wu'><dt id='Zv5Wu'><q id='Zv5Wu'><span id='Zv5Wu'><b id='Zv5Wu'><form id='Zv5Wu'><ins id='Zv5Wu'></ins><ul id='Zv5Wu'></ul><sub id='Zv5Wu'></sub></form><legend id='Zv5Wu'></legend><bdo id='Zv5Wu'><pre id='Zv5Wu'><center id='Zv5Wu'></center></pre></bdo></b><th id='Zv5Wu'></th></span></q></dt></tr></i><div id='Zv5Wu'><tfoot id='Zv5Wu'></tfoot><dl id='Zv5Wu'><fieldset id='Zv5Wu'></fieldset></dl></div>

        cmake 找不到 qt 5.1.1

        cmake does not find qt 5.1.1(cmake 找不到 qt 5.1.1)

          <small id='wJlJW'></small><noframes id='wJlJW'>

          <legend id='wJlJW'><style id='wJlJW'><dir id='wJlJW'><q id='wJlJW'></q></dir></style></legend>
          • <bdo id='wJlJW'></bdo><ul id='wJlJW'></ul>
            <tfoot id='wJlJW'></tfoot>

              <tbody id='wJlJW'></tbody>

              <i id='wJlJW'><tr id='wJlJW'><dt id='wJlJW'><q id='wJlJW'><span id='wJlJW'><b id='wJlJW'><form id='wJlJW'><ins id='wJlJW'></ins><ul id='wJlJW'></ul><sub id='wJlJW'></sub></form><legend id='wJlJW'></legend><bdo id='wJlJW'><pre id='wJlJW'><center id='wJlJW'></center></pre></bdo></b><th id='wJlJW'></th></span></q></dt></tr></i><div id='wJlJW'><tfoot id='wJlJW'></tfoot><dl id='wJlJW'><fieldset id='wJlJW'></fieldset></dl></div>

                1. 本文介绍了cmake 找不到 qt 5.1.1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我刚刚为 Windows 32 位(MinGW 4.8,OpenGL)安装了 Qt 5.1.1,并尝试将其添加到我的 cmake 中.但 CMake 只是不想找到它,我不知道为什么.我错过了什么?我需要设置环境变量还是什么?

                  I just installed the Qt 5.1.1 for Windows 32-bit (MinGW 4.8, OpenGL) and tried to add it to my cmake. But CMake just does not want to find it and i dont know why. What am i missing? Do i need to set an environment variable or something?

                  这是我的 cmake :

                  Here is my cmake :

                  cmake_minimum_required( VERSION 2.8.11 )
                  PROJECT(Blemmer)
                  # Find includes in corresponding build directories
                  set(CMAKE_INCLUDE_CURRENT_DIR ON)
                  # Instruct CMake to run moc automatically when needed.
                  set(CMAKE_AUTOMOC ON)
                  # Detect and add SFML
                  set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modules" ${CMAKE_MODULE_PATH})
                  
                  set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin )
                  set( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib )
                  find_package(SFML REQUIRED system window graphics network audio)
                  # The QUIET option disables messages if the package cannot be found. 
                  FIND_PACKAGE(Qt5Widgets) 
                  add_subdirectory(Entity)
                  add_subdirectory(Engine)
                  add_subdirectory(Game)
                  add_executable(Blemmer main.cpp)
                  
                  include_directories(${SFML_INCLUDE_DIR} ${PROJECT_SOURCE_DIR})
                  target_link_libraries(Blemmer ${SFML_LIBRARIES} Game Engine Qt5::Widgets)
                  

                  这是 cmake-gui 的输出:

                  and this is the output of cmake-gui :

                  CMake Warning at CMakeLists.txt:14 (FIND_PACKAGE):
                    By not providing "FindQt5Widgets.cmake" in CMAKE_MODULE_PATH this project
                    has asked CMake to find a package configuration file provided by
                    "Qt5Widgets", but CMake did not find one.
                  
                    Could not find a package configuration file provided by "Qt5Widgets" with
                    any of the following names:
                  
                      Qt5WidgetsConfig.cmake
                      qt5widgets-config.cmake
                  
                    Add the installation prefix of "Qt5Widgets" to CMAKE_PREFIX_PATH or set
                    "Qt5Widgets_DIR" to a directory containing one of the above files.  If
                    "Qt5Widgets" provides a separate development package or SDK, be sure it has
                    been installed.
                  

                  推荐答案

                  Qt安装需要设置CMAKE_PREFIX_PATH.

                  You need to set the CMAKE_PREFIX_PATH to the Qt installation.

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

                  这篇关于cmake 找不到 qt 5.1.1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  What is inside .lib file of Static library, Statically linked dynamic library and dynamically linked dynamic library?(静态库、静态链接动态库和动态链接动态库的 .lib 文件里面是什么?)
                  How do I load a C DLL from the SXS in Python?(如何从 Python 中的 SXS 加载 C DLL?)
                  Can Cython code be compiled to a dll so C++ application can call it?(Cython 代码可以编译成 dll 以便 C++ 应用程序可以调用它吗?)
                  Delay Loading DLLs(延迟加载 DLL)
                  Throwing C++ exceptions across DLL boundaries(跨 DLL 边界抛出 C++ 异常)
                  Loading a dll from a dll?(从 dll 加载 dll?)
                    <tbody id='qcBOR'></tbody>
                2. <i id='qcBOR'><tr id='qcBOR'><dt id='qcBOR'><q id='qcBOR'><span id='qcBOR'><b id='qcBOR'><form id='qcBOR'><ins id='qcBOR'></ins><ul id='qcBOR'></ul><sub id='qcBOR'></sub></form><legend id='qcBOR'></legend><bdo id='qcBOR'><pre id='qcBOR'><center id='qcBOR'></center></pre></bdo></b><th id='qcBOR'></th></span></q></dt></tr></i><div id='qcBOR'><tfoot id='qcBOR'></tfoot><dl id='qcBOR'><fieldset id='qcBOR'></fieldset></dl></div>

                    <small id='qcBOR'></small><noframes id='qcBOR'>

                        <bdo id='qcBOR'></bdo><ul id='qcBOR'></ul>
                      • <legend id='qcBOR'><style id='qcBOR'><dir id='qcBOR'><q id='qcBOR'></q></dir></style></legend><tfoot id='qcBOR'></tfoot>