Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Conan + CMake + Qt 6.5 deployment issue
QtWS25 Last Chance

Conan + CMake + Qt 6.5 deployment issue

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
conancmakedeploy
4 Posts 3 Posters 745 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    codeform
    wrote on 28 Jun 2023, 00:48 last edited by
    #1

    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-api

    Maybe someone can share some code snippets? Ideally, I would like the CMakeLists.txt to work on all platforms (Windows, Linux and MacOS).

    C 1 Reply Last reply 29 Jun 2023, 13:06
    0
    • C codeform
      28 Jun 2023, 00:48

      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-api

      Maybe someone can share some code snippets? Ideally, I would like the CMakeLists.txt to work on all platforms (Windows, Linux and MacOS).

      C Offline
      C Offline
      cristian-adam
      wrote on 29 Jun 2023, 13:06 last edited by
      #2

      What happens if you use something like:

      cmake --install . --prefix instdir
      

      ?

      C 1 Reply Last reply 29 Jun 2023, 14:35
      0
      • C cristian-adam
        29 Jun 2023, 13:06

        What happens if you use something like:

        cmake --install . --prefix instdir
        

        ?

        C Offline
        C Offline
        codeform
        wrote on 29 Jun 2023, 14:35 last edited by codeform
        #3

        @cristian-adam

        I tried that. Same issue.

        K 1 Reply Last reply 17 Aug 2023, 08:32
        0
        • C codeform
          29 Jun 2023, 14:35

          @cristian-adam

          I tried that. Same issue.

          K Offline
          K Offline
          kuroki
          wrote on 17 Aug 2023, 08:32 last edited by kuroki
          #4

          @codeform I'm having the same issue. Conan's version of Qt doesn't seem to set the right qt cmake variables.
          Namely, QT6_IS_SHARED_LIBS_BUILD and QT_DEPLOY_SUPPORT are missing.

          1 Reply Last reply
          1

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved