Am Donnerstag, 10. Oktober 2013, 00:11:45 schrieb Sebastian Kügler: > On Wednesday, October 09, 2013 18:14:10 Daniel Nicoletti wrote: > > I have added this to some of my qt5 projects and it worked: > > > > add_definitions(-fPIC) > > Thanks Daniel, that helps. :) > > > 2013/10/9 Sebastian Kügler <se...@kde.org>: > > > /home/sebas/kf5/qt5/qtbase/include/QtCore/../../src/corelib/global/qglob > > > al > > > .h:991:4: error: #error "You must build your code with position > > > independent code if Qt was built with -reduce-relocations. " "Compile > > > your code with -fPIC or -fPIE." make[2]: ***
I guess a better solution is: set(CMAKE_POSITION_INDEPENDENT_CODE ON) This will probably also work with other compilers. _______________________________________________ Kde-frameworks-devel mailing list Kde-frameworks-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-frameworks-devel