Make a branch to make krunner Good Enough For Aaron™.
[kdebase/uwolfer.git] / runtime / kstyles / keramik / CMakeLists.txt
blob600ef8815be95809ef04a4cb5ef812f205d7b6f6
2 project(kstyle-keramik)
4 find_package(Blitz REQUIRED)
6 add_definitions(-DQT_PLUGIN)
8 include_directories( ${BLITZ_INCLUDES} )
10 ########### next target ###############
12 set(genembed_SRCS genembed.cpp )
15 kde4_add_executable(genembed NOGUI RUN_UNINSTALLED ${genembed_SRCS})
17 target_link_libraries(genembed  ${KDE4_KDECORE_LIBS} ${BLITZ_LIBRARIES} ${QT_QTGUI_LIBRARIES} )
19 #pixmaps.keramik keramikrc.h: genembed
20 #       pics=`ls $(srcdir)/pics/*.png 2>/dev/null` ;\
21 #       ./genembed $$pics > pixmaps.keramik
23 file(GLOB keramikPics "${CMAKE_CURRENT_SOURCE_DIR}/pics/*.png")
24 file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/keramikPics.txt "" )
25 foreach(pics ${keramikPics})
26    file(APPEND  ${CMAKE_CURRENT_BINARY_DIR}/keramikPics.txt "${pics}\n" )
27 endforeach(pics ${keramikPics})
29 # get the name of the generated wrapper script (which sets up LD_LIBRARY_PATH)
30 get_target_property(GENEMBED_EXECUTABLE genembed WRAPPER_SCRIPT)
32 add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/keramikrc.h ${CMAKE_CURRENT_BINARY_DIR}/pixmaps.keramik
33   COMMAND ${GENEMBED_EXECUTABLE} --file ${CMAKE_CURRENT_BINARY_DIR}/keramikPics.txt > ${CMAKE_CURRENT_BINARY_DIR}/pixmaps.keramik
34   DEPENDS genembed ${keramikPics}
37 ########### next target ###############
39 set(keramik_PART_SRCS
40    keramik.cpp
41    pixmaploader.cpp
42    gradients.cpp
43    colorutil.cpp
44    ${CMAKE_CURRENT_BINARY_DIR}/keramikrc.h  # adding the generated header here will force the correct generation of the dependencies to genembed
47 # this actually shouldn't be required, maybe current cmake cvs handles it correctly, Alex
48 #set_source_files_properties(keramik.cpp PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/keramikrc.h)
50 if (WIN32)
51    set_source_files_properties(keramik.cpp PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/keramikrc.h)
52 endif (WIN32)
55 kde4_add_plugin(keramik ${keramik_PART_SRCS})
57 target_link_libraries(keramik  ${KDE4_KDEUI_LIBS} ${BLITZ_LIBRARIES} )
59 install(TARGETS keramik  DESTINATION ${PLUGIN_INSTALL_DIR}/plugins/styles/ )
62 ########### install files ###############