~ubuntu-branches/ubuntu/utopic/kde-workspace/utopic-proposed

« back to all changes in this revision

Viewing changes to kstyles/keramik/CMakeLists.txt

  • Committer: Bazaar Package Importer
  • Author(s): Michał Zając
  • Date: 2011-07-09 08:31:15 UTC
  • Revision ID: james.westby@ubuntu.com-20110709083115-ohyxn6z93mily9fc
Tags: upstream-4.6.90
Import upstream version 4.6.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
project(kstyle-keramik)
 
3
 
 
4
find_package(QImageBlitz REQUIRED)
 
5
 
 
6
add_definitions(-DQT_PLUGIN)
 
7
 
 
8
include_directories( ${QIMAGEBLITZ_INCLUDES} )
 
9
 
 
10
add_subdirectory(config)
 
11
 
 
12
########### next target ###############
 
13
 
 
14
set(genembed_SRCS genembed.cpp )
 
15
 
 
16
 
 
17
kde4_add_executable(genembed NOGUI ${genembed_SRCS})
 
18
 
 
19
target_link_libraries(genembed  ${KDE4_KDECORE_LIBS} ${QIMAGEBLITZ_LIBRARIES} ${QT_QTGUI_LIBRARIES} )
 
20
 
 
21
#pixmaps.keramik keramikrc.h: genembed
 
22
#       pics=`ls $(srcdir)/pics/*.png 2>/dev/null` ;\
 
23
#       ./genembed $$pics > pixmaps.keramik
 
24
 
 
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})
 
30
 
 
31
# get the name of the generated wrapper script (which sets up LD_LIBRARY_PATH)
 
32
get_target_property(GENEMBED_EXECUTABLE genembed WRAPPER_SCRIPT)
 
33
 
 
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}
 
37
)
 
38
 
 
39
########### next target ###############
 
40
 
 
41
set(keramik_PART_SRCS
 
42
   keramik.cpp
 
43
   pixmaploader.cpp
 
44
   gradients.cpp
 
45
   colorutil.cpp
 
46
   ${CMAKE_CURRENT_BINARY_DIR}/keramikrc.h  # adding the generated header here will force the correct generation of the dependencies to genembed
 
47
)
 
48
 
 
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)
 
51
 
 
52
if (WIN32)
 
53
   set_source_files_properties(keramik.cpp PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/keramikrc.h)
 
54
endif (WIN32)
 
55
 
 
56
 
 
57
kde4_add_plugin(keramik ${keramik_PART_SRCS})
 
58
 
 
59
target_link_libraries(keramik  ${KDE4_KDEUI_LIBS} ${QIMAGEBLITZ_LIBRARIES} )
 
60
 
 
61
install(TARGETS keramik  DESTINATION ${PLUGIN_INSTALL_DIR}/plugins/styles/ )
 
62
 
 
63
 
 
64
########### install files ###############
 
65
 
 
66
 
 
67
 
 
68
 
 
69