2
project(kstyle-keramik)
4
find_package(QImageBlitz REQUIRED)
6
add_definitions(-DQT_PLUGIN)
8
include_directories( ${QIMAGEBLITZ_INCLUDES} )
10
add_subdirectory(config)
12
########### next target ###############
14
set(genembed_SRCS genembed.cpp )
17
kde4_add_executable(genembed NOGUI ${genembed_SRCS})
19
target_link_libraries(genembed ${KDE4_KDECORE_LIBS} ${QIMAGEBLITZ_LIBRARIES} ${QT_QTGUI_LIBRARIES} )
21
#pixmaps.keramik keramikrc.h: genembed
22
# pics=`ls $(srcdir)/pics/*.png 2>/dev/null` ;\
23
# ./genembed $$pics > pixmaps.keramik
25
file(GLOB keramikPics "${CMAKE_CURRENT_SOURCE_DIR}/pics/*.png")
26
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/keramikPics.txt "" )
27
foreach(pics ${keramikPics})
28
file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/keramikPics.txt "${pics}\n" )
29
endforeach(pics ${keramikPics})
31
# get the name of the generated wrapper script (which sets up LD_LIBRARY_PATH)
32
get_target_property(GENEMBED_EXECUTABLE genembed WRAPPER_SCRIPT)
34
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/keramikrc.h ${CMAKE_CURRENT_BINARY_DIR}/pixmaps.keramik
35
COMMAND ${GENEMBED_EXECUTABLE} --file ${CMAKE_CURRENT_BINARY_DIR}/keramikPics.txt > ${CMAKE_CURRENT_BINARY_DIR}/pixmaps.keramik
36
DEPENDS genembed ${keramikPics}
39
########### next target ###############
46
${CMAKE_CURRENT_BINARY_DIR}/keramikrc.h # adding the generated header here will force the correct generation of the dependencies to genembed
49
# this actually shouldn't be required, maybe current cmake cvs handles it correctly, Alex
50
#set_source_files_properties(keramik.cpp PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/keramikrc.h)
53
set_source_files_properties(keramik.cpp PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/keramikrc.h)
57
kde4_add_plugin(keramik ${keramik_PART_SRCS})
59
target_link_libraries(keramik ${KDE4_KDEUI_LIBS} ${QIMAGEBLITZ_LIBRARIES} )
61
install(TARGETS keramik DESTINATION ${PLUGIN_INSTALL_DIR}/plugins/styles/ )
64
########### install files ###############