0

I am developing a Qt application and would like to deploy web engine dll's with the application.

The application does not have dependencies to webengine nevertheless I want to deploy webengine dll's.

Snippet from Cmake:

find_package(Qt5 COMPONENTS Core Widgets Quick Qml WebEngine WebSockets)
# Deploy web engine dlls in release mode
if (CMAKE_BUILD_TYPE STREQUAL  "Release")
    install(
        CODE 
        "execute_process(
        COMMAND ${WINDEPLOYQT_EXECUTABLE} --verbose 0 --no-compiler-runtime
        -webengine -websockets WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/bin)"
    )
    message("Release build")
endif (CMAKE_BUILD_TYPE STREQUAL "Release")

Currently the above code does not produce any result. I do not want to provide binary to the execute process because the binary does not have any dependency.

Thank you

hunt
  • 1
  • 1
  • I don't understand why you would want to do so, is there another dependency (sub-library of some sort)? If so, you would need to run windeployqt on that dependency as well. Maybe `-qtwebengine` works? – Amfasis Aug 01 '19 at 06:58
  • @Amfasis: A plugin/library will be developed from third party and I need to provide dll's. I know this is not the best solution but it can't be changed. – hunt Aug 01 '19 at 07:08
  • In that case I would run windeployqt on that dll as well (this actually works as expected, it's not only working for .exe) – Amfasis Aug 01 '19 at 07:43
  • @Amfasis: Can it be done independent of dll? – hunt Aug 02 '19 at 10:11
  • I don't think so, you might be able to trick windeployqt by adding the dependency on your main program in your `target_link_libraries` line? However, maybe cmake is smart enough to see that you don't use that dependency and it'll not end up in the executable and thus windeployqt will not add it – Amfasis Aug 02 '19 at 19:41

0 Answers0