You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tde-style-polyester/client/CMakeLists.txt

97 lines
2.8 KiB

################################################################################
# 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)