diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..1f5f02c --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,79 @@ +############################################ +# # +# Improvements and feedbacks are welcome # +# # +# This file is released under GPL >= 3 # +# # +############################################ + + +cmake_minimum_required( VERSION 2.8 ) + + +#### general package setup + +project( kooldock ) +set( VERSION R14.1.0 ) + + +#### include essential cmake modules + +include( FindPkgConfig ) +include( CheckFunctionExists ) +include( CheckSymbolExists ) +include( CheckIncludeFile ) +include( CheckLibraryExists ) +include( CheckCSourceCompiles ) +include( CheckCXXSourceCompiles ) + + +#### include our cmake modules + +set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" ) +include( TDEMacros ) + + +##### setup install paths + +include( TDESetupPaths ) +tde_setup_paths( ) + + +##### optional stuff + +option( WITH_ALL_OPTIONS "Enable all optional support" OFF ) +option( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" ${WITH_ALL_OPTIONS} ) + + +##### user requested modules + +option( BUILD_ALL "Build all" ON ) +option( BUILD_TRANSLATIONS "Build translations" ${BUILD_ALL} ) + + +##### configure checks + +include( ConfigureChecks.cmake ) + + +###### global compiler settings + +add_definitions( -DHAVE_CONFIG_H -UTQT_NO_ASCII_CAST ) + +set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" ) +set( CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined" ) +set( CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined" ) + + +##### directories + +add_subdirectory( src ) +add_subdirectory( backgrounds ) +add_subdirectory( icons ) +tde_conditional_add_subdirectory( BUILD_TRANSLATIONS po ) + + + +##### write configure files + +configure_file( config.h.cmake config.h @ONLY ) diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake new file mode 100644 index 0000000..889db5c --- /dev/null +++ b/ConfigureChecks.cmake @@ -0,0 +1,26 @@ +########################################### +# # +# Improvements and feedback are welcome # +# # +# This file is released under GPL >= 3 # +# # +########################################### + + +# required stuff +find_package( TQt ) +find_package( TDE ) + +tde_setup_architecture_flags( ) + +include(TestBigEndian) +test_big_endian(WORDS_BIGENDIAN) + +tde_setup_largefiles( ) + + +##### check for gcc visibility support + +if( WITH_GCC_VISIBILITY ) + tde_setup_gcc_visibility( ) +endif( WITH_GCC_VISIBILITY ) diff --git a/backgrounds/CMakeLists.txt b/backgrounds/CMakeLists.txt new file mode 100644 index 0000000..6d0aa9f --- /dev/null +++ b/backgrounds/CMakeLists.txt @@ -0,0 +1 @@ +tde_auto_add_subdirectories( ) diff --git a/backgrounds/border-black/CMakeLists.txt b/backgrounds/border-black/CMakeLists.txt new file mode 100644 index 0000000..62b424c --- /dev/null +++ b/backgrounds/border-black/CMakeLists.txt @@ -0,0 +1,6 @@ +file( GLOB _pics RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.png ) + +install( + FILES ${_pics} + DESTINATION ${DATA_INSTALL_DIR}/${PROJECT_NAME}/backgrounds/border-black +) diff --git a/backgrounds/border-white/CMakeLists.txt b/backgrounds/border-white/CMakeLists.txt new file mode 100644 index 0000000..bc25ab0 --- /dev/null +++ b/backgrounds/border-white/CMakeLists.txt @@ -0,0 +1,6 @@ +file( GLOB _pics RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.png ) + +install( + FILES ${_pics} + DESTINATION ${DATA_INSTALL_DIR}/${PROJECT_NAME}/backgrounds/border-white +) diff --git a/backgrounds/crystal/CMakeLists.txt b/backgrounds/crystal/CMakeLists.txt new file mode 100644 index 0000000..68bf2f9 --- /dev/null +++ b/backgrounds/crystal/CMakeLists.txt @@ -0,0 +1,6 @@ +file( GLOB _pics RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.png ) + +install( + FILES ${_pics} + DESTINATION ${DATA_INSTALL_DIR}/${PROJECT_NAME}/backgrounds/crystal +) diff --git a/backgrounds/default/CMakeLists.txt b/backgrounds/default/CMakeLists.txt new file mode 100644 index 0000000..d7f3783 --- /dev/null +++ b/backgrounds/default/CMakeLists.txt @@ -0,0 +1,6 @@ +file( GLOB _pics RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.png ) + +install( + FILES ${_pics} + DESTINATION ${DATA_INSTALL_DIR}/${PROJECT_NAME}/backgrounds/default +) diff --git a/backgrounds/fadeout/CMakeLists.txt b/backgrounds/fadeout/CMakeLists.txt new file mode 100644 index 0000000..b1a363b --- /dev/null +++ b/backgrounds/fadeout/CMakeLists.txt @@ -0,0 +1,6 @@ +file( GLOB _pics RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.png ) + +install( + FILES ${_pics} + DESTINATION ${DATA_INSTALL_DIR}/${PROJECT_NAME}/backgrounds/fadeout +) diff --git a/backgrounds/fadeout2/CMakeLists.txt b/backgrounds/fadeout2/CMakeLists.txt new file mode 100644 index 0000000..b66689b --- /dev/null +++ b/backgrounds/fadeout2/CMakeLists.txt @@ -0,0 +1,6 @@ +file( GLOB _pics RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.png ) + +install( + FILES ${_pics} + DESTINATION ${DATA_INSTALL_DIR}/${PROJECT_NAME}/backgrounds/fadeout2 +) diff --git a/backgrounds/fadeout3/CMakeLists.txt b/backgrounds/fadeout3/CMakeLists.txt new file mode 100644 index 0000000..54d690a --- /dev/null +++ b/backgrounds/fadeout3/CMakeLists.txt @@ -0,0 +1,6 @@ +file( GLOB _pics RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.png ) + +install( + FILES ${_pics} + DESTINATION ${DATA_INSTALL_DIR}/${PROJECT_NAME}/backgrounds/fadeout3 +) diff --git a/backgrounds/osx/CMakeLists.txt b/backgrounds/osx/CMakeLists.txt new file mode 100644 index 0000000..d394831 --- /dev/null +++ b/backgrounds/osx/CMakeLists.txt @@ -0,0 +1,6 @@ +file( GLOB _pics RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.png ) + +install( + FILES ${_pics} + DESTINATION ${DATA_INSTALL_DIR}/${PROJECT_NAME}/backgrounds/osx +) diff --git a/config.h.cmake b/config.h.cmake new file mode 100644 index 0000000..61ede3a --- /dev/null +++ b/config.h.cmake @@ -0,0 +1,8 @@ +#define VERSION "@VERSION@" + +// Defined if you have fvisibility and fvisibility-inlines-hidden support. +#cmakedefine __KDE_HAVE_GCC_VISIBILITY 1 + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#cmakedefine WORDS_BIGENDIAN @WORDS_BIGENDIAN@ diff --git a/icons/CMakeLists.txt b/icons/CMakeLists.txt new file mode 100644 index 0000000..d352db6 --- /dev/null +++ b/icons/CMakeLists.txt @@ -0,0 +1,3 @@ +tde_install_icons( ) + +tde_install_icons( DESTINATION ${DATA_INSTALL_DIR}/${PROJECT_NAME}/icons ) diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt new file mode 100644 index 0000000..ad36a01 --- /dev/null +++ b/po/CMakeLists.txt @@ -0,0 +1,5 @@ +file( GLOB _srcs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.po ) + +if( _srcs ) + tde_create_translation( LANG auto OUTPUT_NAME ${PROJECT_NAME} ) +endif( ) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 0000000..6cb5864 --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,34 @@ +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_LIB_DIR} +) + + +##### kooldock (executable) + +tde_add_executable( ${PROJECT_NAME} AUTOMOC + + SOURCES + appProp.ui + setupdialog.ui + apppropprg.cpp + clip.cpp dinfo.cpp + item.cpp kooldock.cpp + main.cpp + setupdialogprg.cpp + xosd.cpp + LINK + tdecore-shared + tdeio-shared + tdeui-shared + + DESTINATION ${BIN_INSTALL_DIR} +) diff --git a/src/apppropprg.h b/src/apppropprg.h index 605b07d..1aaeda0 100644 --- a/src/apppropprg.h +++ b/src/apppropprg.h @@ -12,7 +12,7 @@ #ifndef APPPROPPRG_H #define APPPROPPRG_H -#include +#include #include "appProp.h" /** diff --git a/src/clip.cpp b/src/clip.cpp index d47b3e8..023cedc 100644 --- a/src/clip.cpp +++ b/src/clip.cpp @@ -1,8 +1,8 @@ #include "clip.h" -#include -#include -#include +#include +#include +#include #include #include #include @@ -47,3 +47,4 @@ void clip::paintEvent(TQPaintEvent*) mp.end(); setMask(bm); } +#include "clip.moc" diff --git a/src/clip.h b/src/clip.h index b2701b4..11fca73 100644 --- a/src/clip.h +++ b/src/clip.h @@ -5,7 +5,7 @@ #include #endif -#include +#include #include #include diff --git a/src/item.cpp b/src/item.cpp index ad43c7e..15c1266 100644 --- a/src/item.cpp +++ b/src/item.cpp @@ -18,9 +18,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include "item.h" diff --git a/src/item.h b/src/item.h index 5d94695..2682ade 100644 --- a/src/item.h +++ b/src/item.h @@ -21,13 +21,13 @@ #include #include -#include -#include -#include +#include +#include +#include #include -#include -#include +#include +#include const int MAX_LEN = 256; const int SIZE_INC = 1; diff --git a/src/kooldock.cpp b/src/kooldock.cpp index 00a0ec3..d81143e 100644 --- a/src/kooldock.cpp +++ b/src/kooldock.cpp @@ -19,21 +19,21 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -46,7 +46,7 @@ #include #include #include -#include +#include #include // for "renicing" the bar @@ -61,13 +61,12 @@ #include "setupdialogprg.h" // macros - #define min(a, b) (a < b) ? (a) : (b) #define max(a, b) (a > b) ? (a) : (b) #include -#include -#include +//#include +#include KoolDock::KoolDock(TQWidget* parent, const char* name) : TQWidget(parent, name, WStyle_Customize | WStyle_NoBorder | WNoAutoErase | WDestructiveClose | WStyle_StaysOnTop) @@ -3959,3 +3958,4 @@ void KoolDock::rmFromTaskList(WId id) } } } +#include "kooldock.moc" diff --git a/src/kooldock.h b/src/kooldock.h index 34731ff..9e87d6b 100644 --- a/src/kooldock.h +++ b/src/kooldock.h @@ -28,14 +28,14 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include -#include +#include #include "item.h" #include "xosd.h" diff --git a/src/setupdialogprg.cpp b/src/setupdialogprg.cpp index ae304cb..6e760a7 100644 --- a/src/setupdialogprg.cpp +++ b/src/setupdialogprg.cpp @@ -19,13 +19,13 @@ #include #include #include -#include +#include #include -#include -#include -#include -#include +#include +#include +#include +#include #include "setupdialog.h" #include "setupdialogprg.h" diff --git a/src/setupdialogprg.h b/src/setupdialogprg.h index 4d5b308..51c3b20 100644 --- a/src/setupdialogprg.h +++ b/src/setupdialogprg.h @@ -16,16 +16,16 @@ #include "apppropprg.h" // QT includes -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // KDE includes #include diff --git a/src/xosd.cpp b/src/xosd.cpp index c4a100f..fed3313 100644 --- a/src/xosd.cpp +++ b/src/xosd.cpp @@ -1,12 +1,12 @@ #include "xosd.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include -#include +#include #include #include #include @@ -193,3 +193,4 @@ void xosd::move2(int x, int y) lastY = y; } } +#include "xosd.moc" diff --git a/src/xosd.h b/src/xosd.h index 6d1b206..6bd6206 100644 --- a/src/xosd.h +++ b/src/xosd.h @@ -5,11 +5,11 @@ #include #endif -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include