Style plugins: cmake, loading mechanism...
Sandro Giessl
sandro at giessl.com
Thu Jun 22 11:40:41 BST 2006
Hi,
I'm writing because I would like to become somewhat productive on KStyles
again. But I have already spent hours trying to figure out a reliable way for
KDE and Qt-Applications to load those style plugins...
As far as I can see, the only problem is how the plugins are built at the
moment (Plastik: [1]). For some reason they won't be recognized/loaded by
QStyleFactory.
Based on info from [2] I tried to build Plastik with the following
CMakeLists.txt (lots of hardcoded paths...) which does work:
->---------
project(plastiq4)
find_package(Qt4 REQUIRED)
include(${QT_USE_FILE})
set(plastiq4_SRCS plastik.cpp misc.cpp)
qt4_automoc(${plastiq4_SRCS})
ADD_DEFINITIONS(${QT_DEFINITIONS})
ADD_DEFINITIONS(-DQT_PLUGIN)
ADD_DEFINITIONS(-DQT_NO_DEBUG)
ADD_DEFINITIONS(-DQT_SHARED)
ADD_LIBRARY(plastiq4 SHARED ${plastiq4_SRCS})
target_link_libraries(plastiq4
${QT_LIBRARIES} /home/k4dev/kde/lib/libkdefx.so)
INCLUDE_DIRECTORIES( ${QT_INCLUDE_DIR} /home/k4dev/kde/include)
install(TARGETS plastiq4 DESTINATION lib/kde4/plugins/styles)
---------<-
Could anyone explain why [1] doesn't work for me? I don't know enough about
shared objects/cmake/QLibrary and stuff yet to fix it myself. Thanks!
Regards, Sandro
1:
http://websvn.kde.org/trunk/KDE/kdelibs/kstyles/plastik/CMakeLists.txt?rev=540221&view=auto
2: http://qtnode.net/wiki/Qt_with_cmake#cmake_for_Qt_4
More information about the kde-core-devel
mailing list