I am using a series of ExternalPorject_Add's to download, configure, build, and install QT5 statically using CMake. Everything goes well until the configure script. The Qt5 configure script issues the following warning when compiling statically, after which, the build and install steps are ignored:
CUSTOMBUILD : warning : Using static linking will disable the use of plugins.
Make sure you compile ALL needed modules into the library.
My final ExternaProject_Add is as follows (there are other's to break the download step into a different target):
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
)
Are there any thoughts on how to get the project to ignore the warnings (is the warning even what is causing it to stop?) and continue with the build and install steps?
I am currently running on windows (working on a cross-platform installer), and using the visual studio 2013 generator with cmake.
Thanks!
The configure script was returning a non-zero result causing the subsequent steps to fail, even though the warning really is non-fatal. I've stepped away from using
ExternalProject
and just implemented the same functionality usingadd_custom_target
.I had the same problem as you. It turns out it has nothing to do with the warnings or even the exit code (in this case).
It happens because the configure file is a batch file and Visual Studio is executing the configure build steps in another batch file.
This means that if you don't use the keyword
call
in front ofconfigure
, you will branch off to theconfigure.bat
and never return and execute the remaining steps in the Visual Studio configure step.To fix this you can do: