Conan + CMake + Qt 6.5 deployment issue
-
I have implemented a very simple C++ test project (simple QMainWindow) using Conan, CMake and Qt 6.5 that I would like to build and deploy on multiple platforms.
So far, I was able to build an EXE but haven't figured out how to script the CMakeLists.txt to deploy the EXE and its dependencies.These are the commands that I am using:
mkdir build && cd build conan install .. --build=missing cmake .. cmake --build .
So far so good, but when I am running cmake --install., I am getting errors such as:
CMake Error at .qt/deploy_TestDeploy_4a9b6cc5f7.cmake:1 (include):
include called with wrong number of arguments. include() only takes one file.If I open this file .qt/deploy_TestDeploy_4a9b6cc5f7.cmake, I can see the first line has an include() statement with no argument.
I have tried all the scripts I found online (on the Qt site and others) but none of them works. For instance:
https://doc.qt.io/qt-6/qt-generate-deploy-script.html
https://www.qt.io/blog/cmake-deployment-apiMaybe someone can share some code snippets? Ideally, I would like the CMakeLists.txt to work on all platforms (Windows, Linux and MacOS).
-
What happens if you use something like:
cmake --install . --prefix instdir
?
-
I tried that. Same issue.