From cd1471858e29d0d23355a93178e063fd0550d31c Mon Sep 17 00:00:00 2001 From: gregory guy Date: Thu, 16 Jul 2020 14:07:49 +0200 Subject: Conversion to the cmake building system. Added a man page taken from the Debian packaging system. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: gregory guy Resolve issues that occurred during CMake conversion. Concatenate the commands for generating pixmaps.h with CMake so that there is no need to use the GNU specific sed option -i. Signed-off-by: Slávek Banko Signed-off-by: gregory guy (cherry picked from commit d0c03cc9a910ea44cea57b1af43bbd90eb86d4bc) --- config/CMakeLists.txt | 61 ++++++++++++++++++++++++++++++++++++++ config/colordialog.cpp | 6 ++-- config/colorpicker.cpp | 2 ++ config/configdialog.ui | 19 ------------ config/help.ui | 3 -- config/tdestyle_baghira_config.cpp | 8 +++-- 6 files changed, 72 insertions(+), 27 deletions(-) create mode 100644 config/CMakeLists.txt (limited to 'config') diff --git a/config/CMakeLists.txt b/config/CMakeLists.txt new file mode 100644 index 0000000..fb51d78 --- /dev/null +++ b/config/CMakeLists.txt @@ -0,0 +1,61 @@ + +include_directories( + ${CMAKE_BINARY_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} + ${X11_INCLUDE_DIR} +) + +link_directories( + ${TQT_LIBRARY_DIRS} + ${TDE_LIBRARY_DIRS} + ${X11_LIBRARY_DIRS} +) + + +##### pixmaps.h (header) + +set( _pics ${CMAKE_SOURCE_DIR}/imagebase/button-base + ${CMAKE_SOURCE_DIR}/imagebase/button-shadow + ${CMAKE_SOURCE_DIR}/imagebase/brush-me +) + +set( _header pixmaps.h ) + +add_custom_command( + OUTPUT ${_header} + COMMAND + ${UIC_EXECUTABLE} -embed baghira ${_pics} | + ${SED_EXECUTABLE} + -e 's|void qInitImages_baghira|static void qInitImages_baghira|' + -e 's|void qCleanupImages_baghira|static void qCleanupImages_baghira|' + > ${_header} + DEPENDS ${_pics} +) + + +##### tdestyle_baghira_config (kpart) + +set_source_files_properties( + tdestyle_baghira_config.cpp colordialog.cpp + PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${_header} +) + + +tde_add_kpart( tdestyle_baghira_config AUTOMOC + + SOURCES + configdialog.ui + help.ui about.ui + tdestyle_baghira_config.cpp + colordialog.cpp + colorpicker.cpp + LINK + tdecore-shared + tdeui-shared + tdeio-shared + + DESTINATION ${PLUGIN_INSTALL_DIR} +) diff --git a/config/colordialog.cpp b/config/colordialog.cpp index 3ad5504..9b80397 100644 --- a/config/colordialog.cpp +++ b/config/colordialog.cpp @@ -13,9 +13,9 @@ #include #include "colorpicker.h" #include "pixmaps.h" - +#ifdef HAVE_CONFIG_H #include "config.h" - +#endif #ifndef CLAMP #define CLAMP(x,l,u) x < l ? l :\ x > u ? u :\ @@ -298,3 +298,5 @@ TQImage & DemoWindow::tintButton(TQImage &src, TQColor & c) } return ( dest ); } + +#include "colordialog.moc" diff --git a/config/colorpicker.cpp b/config/colorpicker.cpp index e4f2cf9..8878588 100644 --- a/config/colorpicker.cpp +++ b/config/colorpicker.cpp @@ -79,3 +79,5 @@ void ColorPicker::init() { color_ = color(); } + +#include "colorpicker.moc" diff --git a/config/configdialog.ui b/config/configdialog.ui index d9a2fbf..89c25c2 100644 --- a/config/configdialog.ui +++ b/config/configdialog.ui @@ -3016,24 +3016,5 @@ kcolorbutton.h - kcolorbutton.h - kcolorbutton.h - kcolorbutton.h - kcolorbutton.h - kcolorbutton.h - kcolorbutton.h - kcolorbutton.h - kcolorbutton.h - kcolorbutton.h - kcolorbutton.h - kcolorbutton.h - kcolorbutton.h - kcolorbutton.h - kcolorbutton.h - kcolorbutton.h - kcolorbutton.h - kcolorbutton.h - kcolorbutton.h - kcolorbutton.h diff --git a/config/help.ui b/config/help.ui index ac6909d..ac49276 100644 --- a/config/help.ui +++ b/config/help.ui @@ -298,8 +298,5 @@ for hosting the Project kactivelabel.h - kactivelabel.h - kactivelabel.h - kactivelabel.h diff --git a/config/tdestyle_baghira_config.cpp b/config/tdestyle_baghira_config.cpp index a408b4c..be70da4 100644 --- a/config/tdestyle_baghira_config.cpp +++ b/config/tdestyle_baghira_config.cpp @@ -18,6 +18,10 @@ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include @@ -63,8 +67,6 @@ #include "colordialog.h" #include "colorpicker.h" -#include "config.h" - //#define VERSION "0.7" #ifndef TDE_VERSION_STRING @@ -969,7 +971,7 @@ void tdestyle_baghira_config::menuToggled(bool active) extern "C" { - TQWidget* allocate_tdestyle_config(TQWidget* parent){ + KDE_EXPORT TQWidget* allocate_tdestyle_config(TQWidget* parent){ return(new tdestyle_baghira_config(parent, "BaghiraConfig")); } } -- cgit v1.2.1