Cmake, linux, packing all so/etc files for distribution... qt missing plugins/etc
-
Hey
I'm a lil lost, I'm trying to collect all assets for my app in 1 palce & reling executable to be relative based so I can zip it up and give away to people. But I got stuck with relinking...
Cmake deploy code >
target_link_options(testApp PRIVATE LINKER:-rpath=./ ) add_custom_target(Deploy ALL COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:testApp> ${DEPLOY_DIRECTORY} && cp -t ${DEPLOY_DIRECTORY} \`ldd ${DEPLOY_DIRECTORY}/$<TARGET_FILE_NAME:testApp>|grep -Po "'(?<==>).+(?=\\(0x.+\\))'"\` )Now in root of folder, I have platforms folder.
I also have all .so files in root directory too.But I end up with this error >
Cannot load library /home/dariusz/CLionProjects/testAppSrclibOutput/Debug/platforms/libqxcb.so: (libQt6XcbQpa.so.6: cannot open shared object file: No such file or directory) QLibraryPrivate::loadPlugin failed on "/home/dariusz/CLionProjects/testAppSrclibOutput/Debug/platforms/libqxcb.so" : "Cannot load library /home/dariusz/CLionProjects/testAppSrclibOutput/Debug/platforms/libqxcb.so: (libQt6XcbQpa.so.6: cannot open shared object file: No such file or directory)" qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. Cannot load library /home/dariusz/CLionProjects/testAppSrclibOutput/Debug/platforms/libqwayland-generic.so: (libQt6WaylandClient.so.6: cannot open shared object file: No such file or directory) QLibraryPrivate::loadPlugin failed on "/home/dariusz/CLionProjects/testAppSrclibOutput/Debug/platforms/libqwayland-generic.so" : "Cannot load library /home/dariusz/CLionProjects/testAppSrclibOutput/Debug/platforms/libqwayland-generic.so: (libQt6WaylandClient.so.6: cannot open shared object file: No such file or directory)" qt.qpa.plugin: Could not load the Qt platform plugin "wayland" in "" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vkkhrdisplay, vnc, wayland-egl, wayland, xcb.Any hints/ideas?
Thanks.
-
Hi,
You might be interested by this article form ICS about handling the deployment of application using Qt's installer framework.
-
Hi,
You might be interested by this article form ICS about handling the deployment of application using Qt's installer framework.
Hey
@SGaist thanks for the link & tutorial.
Sadly it does not do anything for me, nor the video.
There is no new build targer when I add cpack. I tried it in past, didn't use as it did nothing.I have a complex setup, something somewhere breaks something probably. :- ((((
I gotta say, I though that deploying on linux will be easier than windows. But this is just banana stuff. ;/
I'll keep digging.Running install just gives me >
gmake: *** No rule to make target 'install'. Stop.
Whatever cpack is meant to do, it does not make a new target. -
For Linux it depends on what your goal is. If it's package manager integration, more generic, etc.
Maybe a silly question but did you reconfigure your project after adding the cpack bits ?