blob: 7e9d720609253b60f55c59762697a64188b4f3f1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
################################################################################
# Polyester - widget style and twin decoration aimed to be a good balance #
# between eye candy and simplicity #
# #
# This file is released under the GNU GPL version 3 or later. #
# Improvements and feedback are welcome! #
################################################################################
include_directories(
${CMAKE_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
${TDE_INCLUDE_DIR}
${TQT_INCLUDE_DIRS}
)
link_directories(
${TQT_LIBRARY_DIRS}
${TDE_LIBRARY_DIRS}
)
tde_import(twin)
### buttons.h ##################################################################
file(
GLOB buttons_SOURCES
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/images
${CMAKE_CURRENT_SOURCE_DIR}/images/*.svg
)
list( SORT buttons_SOURCES )
unset( buttons_IMAGES )
file( MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/images )
foreach( _image IN LISTS buttons_SOURCES )
get_filename_component( _image_base ${_image} NAME_WE )
add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/images/${_image_base}.png
COMMAND ${RSVG_COMMAND}
--width=32 --height=32 --format=png
--output=${CMAKE_CURRENT_BINARY_DIR}/images/${_image_base}.png
${CMAKE_CURRENT_SOURCE_DIR}/images/${_image}
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/images/${_image}
)
list( APPEND buttons_IMAGES "images/${_image_base}.png" )
endforeach()
add_custom_target( buttons-prepare-images
COMMENT "Prepare images for embed into buttons"
DEPENDS ${buttons_IMAGES}
)
add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/buttons.h
COMMAND ${UIC_EXECUTABLE} -obuttons.h.in -embed buttons ${buttons_IMAGES}
COMMAND sed "s/factory/bfactory/" < buttons.h.in > buttons.h
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Embed images for buttons"
DEPENDS buttons-prepare-images
)
add_custom_target( buttons-embed-images
COMMENT "Generate embed images for buttons"
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/buttons.h
)
### twin_polyester (kpart) #####################################################
tde_add_kpart( twin_polyester AUTOMOC
SOURCES
polyester.cpp
shadow.cpp
${CMAKE_SOURCE_DIR}/style/misc.cpp
LINK
tdecore-shared
tdeui-shared
tdecorations-shared
DESTINATION ${PLUGIN_INSTALL_DIR}
DEPENDENCIES buttons-embed-images
)
### other data #################################################################
install(
FILES polyester.desktop
DESTINATION ${DATA_INSTALL_DIR}/twin
)
### configuration module #######################################################
add_subdirectory(config)
|