1

I can not find any example on how to download, build and link Qt5 in a cmake project with the ExternalProject_Add command.

I found some snippets but they are in itself not very useful:

ExternalProject_Add(qt5_build
DOWNLOAD_COMMAND "" UPDATE_COMMAND "" PATCH_COMMAND ""
SOURCE_DIR ${QT5_REPO_PATH}
CONFIGURE_COMMAND configure ${QT5_CONFIGURE}
BUILD_COMMAND nmake BUILD_IN_SOURCE 1
INSTALL_COMMAND nmake install
)

So how exactly is this supposed to work?

Since Qt is such a big library, I think it should have been done by several people by now...but to the best of my knowledge I did not find any good example.

The closest question I found is this one, but does not answer my question: CMake ExternalProject_Add Stop Executing on Warning

Captain GouLash
  • 1,257
  • 3
  • 20
  • 33
  • I'd agree that cmake can be really murky. Did you try a github search? Just "ExternalProject_Add" leads to 67k hits. Presumably one of these is a workable example you can copy. Sometimes you can find comments near the diretives, which can help a bit. – Svend Dec 04 '18 at 14:49
  • `ExternalProject_Add` performs steps given as `*_COMMAND` options. Just fill these steps with proper command lines, and Qt will be built. As a source of proper command lines you may take this page: http://doc.qt.io/qt-5/build-sources.html. If you have a problem with performing one or another step, then ask about this **specific problem**. – Tsyvarev Dec 04 '18 at 20:08
  • Thank you. Maybe we should close this question, as I agree that this might be too broad of a question. – Captain GouLash Dec 05 '18 at 07:20

0 Answers0