diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2013-07-07 20:48:40 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2013-07-10 02:11:19 +0200 |
commit | 37c0b00fbf5506397c2e7b73b35f2931ead9e483 (patch) | |
tree | b47ba5de58639ea454020de0e233906a25f81904 | |
parent | 400e114c310a8a35bd3418be22ab04661cb7bfdc (diff) | |
download | tdedocker-37c0b00fbf5506397c2e7b73b35f2931ead9e483.tar.gz tdedocker-37c0b00fbf5506397c2e7b73b35f2931ead9e483.zip |
Convert from qmake to cmake
-rw-r--r-- | CMakeLists.txt | 73 | ||||
-rw-r--r-- | ConfigureChecks.cmake | 33 | ||||
-rw-r--r-- | icons/CMakeLists.txt | 12 | ||||
-rw-r--r-- | po/CMakeLists.txt | 17 | ||||
-rw-r--r-- | src/CMakeLists.txt | 44 | ||||
-rw-r--r-- | src/customtraylabel.cpp | 2 | ||||
-rw-r--r-- | src/kdocker.cpp | 2 | ||||
-rw-r--r-- | src/qtraylabel.cpp | 4 | ||||
-rw-r--r-- | src/traylabelmgr.cpp | 4 | ||||
-rw-r--r-- | src/util.cpp | 2 |
10 files changed, 190 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..0bfae31 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,73 @@ +################################################# +# +# (C) 2011 Timothy Pearson +# kb9vqf (AT) pearsoncomputing.net +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +cmake_minimum_required( VERSION 2.8 ) + + +##### general package setup ##################### + +project( kdocker ) + + +##### include essential cmake modules ########### + +include( CheckCXXSourceCompiles ) +include( CheckFunctionExists ) +include( CheckIncludeFileCXX ) +include( CheckLibraryExists ) +include( CheckStructHasMember ) +include( CheckSymbolExists ) +include( CheckTypeSize ) +include( FindPkgConfig ) + + +##### include our cmake modules ################# + +set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" ) +include( TDEMacros ) + + +##### setup install paths ####################### + +include( TDESetupPaths ) +tde_setup_paths( ) + + +##### user requested modules #################### + +option( BUILD_ALL "Build all" OFF ) +option( BUILD_TRANSLATIONS "Build translations" ${BUILD_ALL} ) + + +##### configure checks ########################## + +include( ConfigureChecks.cmake ) + + +###### global compiler settings ################# + +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" ) + + +##### source directories ######################## + +add_subdirectory( src ) +add_subdirectory( icons ) +tde_conditional_add_subdirectory( BUILD_TRANSLATIONS po ) + + +##### other data ################################ + +INSTALL(FILES kdocker.desktop DESTINATION ${XDG_APPS_INSTALL_DIR}) + + diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake new file mode 100644 index 0000000..5a6ef70 --- /dev/null +++ b/ConfigureChecks.cmake @@ -0,0 +1,33 @@ +################################################# +# +# (C) 2011 Timothy Pearson +# kb9vqf (AT) pearsoncomputing.net +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +if( BUILD_TRANSLATIONS AND NOT DEFINED MSGFMT_EXECUTABLE ) + find_program( MSGFMT_EXECUTABLE msgfmt ) + if( NOT MSGFMT_EXECUTABLE ) + tde_message_fatal( "msgfmt program is required, but was not found on your system" ) + endif( ) +endif( ) + +# common required stuff +find_package( TQt ) +find_package( TDE ) + +# check required packages +pkg_search_module( XMU xmu ) +if( NOT XMU_FOUND ) + tde_message_fatal( "xmu is required, but was not found on your system" ) +endif( ) + +pkg_search_module( XPM xpm ) +if( NOT XPM_FOUND ) + tde_message_fatal( "xpm is required, but was not found on your system" ) +endif( ) + diff --git a/icons/CMakeLists.txt b/icons/CMakeLists.txt new file mode 100644 index 0000000..ffe7d32 --- /dev/null +++ b/icons/CMakeLists.txt @@ -0,0 +1,12 @@ +################################################# +# +# (C) 2011 Timothy Pearson +# kb9vqf (AT) pearsoncomputing.net +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +tde_install_icons( DESTINATION ${DATA_INSTALL_DIR}/kdocker/icons ) diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt new file mode 100644 index 0000000..e2612a2 --- /dev/null +++ b/po/CMakeLists.txt @@ -0,0 +1,17 @@ +################################################# +# +# (C) 2011 Timothy Pearson +# kb9vqf (AT) pearsoncomputing.net +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +file( GLOB_RECURSE po_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} kdocker.po ) + +foreach( _po ${po_files} ) + get_filename_component( _lang ${_po} PATH ) + tde_create_translation( FILES ${_po} LANG ${_lang} ) +endforeach( ) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 0000000..0096124 --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,44 @@ +################################################# +# +# (C) 2011 Timothy Pearson +# kb9vqf (AT) pearsoncomputing.net +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +include_directories( + ${TQT_INCLUDE_DIRS} + ${TDE_INCLUDE_DIR} + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}/src + ${CMAKE_SOURCE_DIR}/src + ${XMU_INCLUDEDIR} + ${XPM_INCLUDEDIR} +) + +link_directories( + ${TQT_LIBRARY_DIRS} +) + + +##### kdocker ################################### + +tde_add_executable( kdocker AUTOMOC + SOURCES + customtraylabel.cpp + kdocker.cpp + main.cpp + qtraylabel.cpp + trace.cpp + traylabelmgr.cpp + util.cpp + LINK + kdecore-shared kdeui-shared DCOP-shared + ${XMU_LIBRARIES} ${XPM_LIBRARIES} + DESTINATION + ${BIN_INSTALL_DIR} +) + diff --git a/src/customtraylabel.cpp b/src/customtraylabel.cpp index 684a098..757df2f 100644 --- a/src/customtraylabel.cpp +++ b/src/customtraylabel.cpp @@ -360,3 +360,5 @@ void CustomTrayLabel::dropEvent(QDropEvent *) "that is brought in front when you hover the item over the tray icon")); } + +#include "customtraylabel.moc" diff --git a/src/kdocker.cpp b/src/kdocker.cpp index fd6ce9b..ded1643 100644 --- a/src/kdocker.cpp +++ b/src/kdocker.cpp @@ -229,3 +229,5 @@ void KDocker::saveState(QSessionManager &sm) // sm.setRestartCommand(applicationFilePath()); } + +#include "kdocker.moc" diff --git a/src/qtraylabel.cpp b/src/qtraylabel.cpp index 34284bd..2c528c1 100644 --- a/src/qtraylabel.cpp +++ b/src/qtraylabel.cpp @@ -37,7 +37,7 @@ #include <X11/cursorfont.h> #include <X11/xpm.h> -#include <Xmu/WinUtil.h> +#include <X11/Xmu/WinUtil.h> #include <string.h> #include <stdlib.h> @@ -809,3 +809,5 @@ bool QTrayLabel::restoreState(QSettings &settings) // End kicking butt + +#include "qtraylabel.moc" diff --git a/src/traylabelmgr.cpp b/src/traylabelmgr.cpp index 9bbf013..54a789e 100644 --- a/src/traylabelmgr.cpp +++ b/src/traylabelmgr.cpp @@ -35,7 +35,7 @@ #include "traylabelmgr.h" #include "util.h" -#include <Xmu/WinUtil.h> +#include <X11/Xmu/WinUtil.h> #include <errno.h> #include <stdlib.h> @@ -523,3 +523,5 @@ bool TrayLabelMgr::x11EventFilter(XEvent *ev) return ret; } + +#include "traylabelmgr.moc" diff --git a/src/util.cpp b/src/util.cpp index 6ddf920..a8766b1 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -23,7 +23,7 @@ #include "util.h" #include <X11/Xutil.h> -#include <Xmu/WinUtil.h> +#include <X11/Xmu/WinUtil.h> #include <X11/Xatom.h> #include <X11/cursorfont.h> |