[Development] build [any] qt-based project ising cmake , outside of qtcreator

Ernst Maurer ernst.maurer at gmail.com
Fri Nov 25 20:12:06 CET 2016


hello

just faced with a requirement to build qt/cmake based project from command
line or another IDE, and could not. what is a qtcreator magic which helps
to do this successfully?

tried to build simplest sample project from actual documentation here (
http://doc.qt.io/qt-5/cmake-manual.html) , the same problem.

it looks like cmake can't find all required .cmake scripts, I don't see the
instructions to set the paths to all .cmake scripts for required modules.

I suppose qtcreator does some "tuning" the project implicitly??

this is the output for sample cmakelists from doc page sample above:

cmake.exe -DCMAKE_BUILD_TYPE=Debug -G "CodeBlocks - MinGW Makefiles"
C:\dev\workspace\algolist.v2
CMake Warning at CMakeLists.txt:13 (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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20161125/9d30e4c8/attachment.html>


More information about the Development mailing list