[CMake] CMake fixup_bundle for ubuntu 16.04

Waldo Valenzuela waldovalenzuela at yahoo.com
Mon Dec 11 14:07:55 EST 2017


Dear All,

I am working on a multi-platform desktop app with Qt5-VTK8, on Windows and Mac no problem to created the standalone app, but in Ubuntu 16.04  I have several problems.

I am using CodeBlocks to compile and run the app, and from CodeBlocks when I run the app there is no problem, it work normally like in windows and mac, but after run the installation, and If I want to run the app from the installation folder (./app ) I have several problems.


the CMakeList.txt is 

FILE(GLOB_RECURSE QTPLUGINS_IMAGEFORMATS ${QT_BASE_DIRECTORY}/plugins/imageformats/*${CMAKE_SHARED_LIBRARY_SUFFIX})
FILE(GLOB_RECURSE QTPLUGINS_PLATFORMS ${QT_BASE_DIRECTORY}/plugins/platforms/*${CMAKE_SHARED_LIBRARY_SUFFIX})

SET(QTPLUGINS ${QTPLUGINS_IMAGEFORMATS} ${QTPLUGINS_PLATFORMS})

MESSAGE("Project libraries: ${QTPLUGINS}")


INSTALL(CODE "
	INCLUDE(BundleUtilities)
	FIXUP_BUNDLE(\"${APPS}\" \"${QTPLUGINS}\" \"${DIRS}\")
    	     " 
	COMPONENT ${PROJECT_NAME})

First I have this:

-- fixup_bundle: fixing...
-- 132/260: fix-up not required on this platform '/home/waldo/Developer/Qt/5.6.3/gcc_64/plugins/imageformats/libqicns.so'
-- 133/260: fix-up not required on this platform '/home/waldo/Developer/install/Release/bratumia/bin/libQt5Core.so.5'
-- 134/260: fix-up not required on this platform '/home/waldo/Developer/install/Release/bratumia/bin/libQt5Gui.so.5’

-- 167/260: fix-up not required on this platform '/home/waldo/Developer/install/Release/bratumia/bin/libITKEXPAT-4.13.so.1'
-- 168/260: fix-up not required on this platform '/home/waldo/Developer/install/Release/bratumia/bin/libITKIOBMP-4.13.so.1'
-- 169/260: fix-up not required on this platform '/home/waldo/Developer/install/Release/bratumia/bin/libITKIOBioRad-4.13.so.1

then when I run: ldd ./app I have:

	libQt5Concurrent.so.5 => not found
	libvtkRenderingImage-9.0.so.1 => not found
	libvtkRenderingVolumeOpenGL2-9.0.so.1 => not found

then if I fix manually the path of the libraries like this:

export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib:/usr/lib/x86_64-linux-gnu:/home/waldo/app/bin/plugins/imageformats:/home/waldo/app/bin/plugins/platforms"

I can run the application from through the command line from the installation folder, but I have this message and I can not see nothing

QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
QOpenGLWidget: Failed to create context
composeAndFlush: makeCurrent() failed


I think that the FIXUP_BUNDLE is doing nothing.

Any help is welcome.

Best regards,

Waldo.


More information about the CMake mailing list