From 9004ae5427c4b939d7fbf21a7ab275181d534175 Mon Sep 17 00:00:00 2001 From: gregory guy Date: Wed, 5 Dec 2018 12:40:07 +0100 Subject: conversion to the cmake building system Signed-off-by: gregory guy --- src/CMakeLists.txt | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++ src/knowit.cpp | 1 + src/knowit.desktop | 2 +- src/knowitapp.cpp | 2 ++ src/knowitchooser.cpp | 2 ++ src/knowitedit.cpp | 1 + src/knowitlink.cpp | 1 + src/knowitlinks.cpp | 2 ++ src/knowitpref.cpp | 2 +- src/knowittree.cpp | 2 +- src/x-knowit.desktop | 2 +- 11 files changed, 74 insertions(+), 4 deletions(-) create mode 100644 src/CMakeLists.txt (limited to 'src') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 0000000..816216c --- /dev/null +++ b/src/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} +) + +link_directories( + ${TQT_LIBRARY_DIRS} + ${TDE_LIB_DIR} +) + + +##### knowit (executable) + +tde_add_executable( ${PROJECT_NAME} AUTOMOC + + SOURCES + main.cpp + knowit.cpp + notes.cpp + knowittree.cpp + knowitlinks.cpp + knowittray.cpp + knowitpref.cpp + knowitlink.cpp + knowitapp.cpp + knowitchooser.cpp + knowitedit.cpp + LINK + tdecore-shared + tdeui-shared + tdeio-shared + tdeprint-shared + + DESTINATION ${BIN_INSTALL_DIR} +) + + +##### icons + +tde_install_icons( ${PROJECT_NAME} ) + + +##### other data + +install( + FILES knowitui.rc tips + DESTINATION ${DATA_INSTALL_DIR}/${PROJECT_NAME} +) + +install( + FILES ${PROJECT_NAME}.desktop + DESTINATION ${XDG_APPS_INSTALL_DIR} +) + +install( + FILES x-${PROJECT_NAME}.desktop + DESTINATION ${MIME_INSTALL_DIR}/application +) diff --git a/src/knowit.cpp b/src/knowit.cpp index a9a2853..730b2af 100644 --- a/src/knowit.cpp +++ b/src/knowit.cpp @@ -1326,3 +1326,4 @@ void Knowit::slotLinkCopy() kapp->clipboard()->setText(link.link, TQClipboard::Selection); } +#include "knowit.moc" diff --git a/src/knowit.desktop b/src/knowit.desktop index 7ab745d..43e6544 100644 --- a/src/knowit.desktop +++ b/src/knowit.desktop @@ -3,7 +3,7 @@ Encoding=UTF-8 Type=Application Exec=knowit -caption "%c" %i %m MimeType=application/x-knowit -Icon=knowit +Icon=desktop X-DocPath=knowit/index.html Comment= Comment[de]= diff --git a/src/knowitapp.cpp b/src/knowitapp.cpp index 16cc68d..8796d94 100644 --- a/src/knowitapp.cpp +++ b/src/knowitapp.cpp @@ -31,3 +31,5 @@ void KnowitApplication::commitData(TQSessionManager& sm) mcloseByLogout = true; KUniqueApplication::commitData(sm); } + +#include "knowitapp.moc" diff --git a/src/knowitchooser.cpp b/src/knowitchooser.cpp index 639b943..45c8035 100644 --- a/src/knowitchooser.cpp +++ b/src/knowitchooser.cpp @@ -83,3 +83,5 @@ void KnowitChooser::setChoice(int flags) rule->setChecked(flags & AddRule); style->setChecked(flags & Style); } + +#include "knowitchooser.moc" diff --git a/src/knowitedit.cpp b/src/knowitedit.cpp index 11f2a29..748759d 100644 --- a/src/knowitedit.cpp +++ b/src/knowitedit.cpp @@ -64,3 +64,4 @@ void KnowitEdit::contentsDropEvent(TQDropEvent* event) else TQTextEdit::contentsDropEvent(event); } +#include "knowitedit.moc" diff --git a/src/knowitlink.cpp b/src/knowitlink.cpp index 863f776..d333c8f 100644 --- a/src/knowitlink.cpp +++ b/src/knowitlink.cpp @@ -99,3 +99,4 @@ void KnowitLinkDialog::slotTypeChanged(int index) browse->setEnabled(!index); } +#include "knowitlink.moc" diff --git a/src/knowitlinks.cpp b/src/knowitlinks.cpp index c2054e8..2114715 100644 --- a/src/knowitlinks.cpp +++ b/src/knowitlinks.cpp @@ -54,3 +54,5 @@ void KnowitLinks::keyPressEvent(TQKeyEvent* e) } else TDEListBox::keyPressEvent(e); } + +#include "knowitlinks.moc" diff --git a/src/knowitpref.cpp b/src/knowitpref.cpp index bbc4b97..d844658 100644 --- a/src/knowitpref.cpp +++ b/src/knowitpref.cpp @@ -389,4 +389,4 @@ void KnowitPreferences::slotUpdateDatePreview() insertDatePreview->setText(str); } - +#include "knowitpref.moc" diff --git a/src/knowittree.cpp b/src/knowittree.cpp index 436da5f..1c66c2b 100644 --- a/src/knowittree.cpp +++ b/src/knowittree.cpp @@ -142,5 +142,5 @@ void KnowitTree::slotItemRight() setCurrentItem(currentItem()->firstChild()); } - +#include "knowittree.moc" diff --git a/src/x-knowit.desktop b/src/x-knowit.desktop index e060ac5..0545753 100644 --- a/src/x-knowit.desktop +++ b/src/x-knowit.desktop @@ -1,6 +1,6 @@ [Desktop Entry] Comment=KnowIt -Icon=knowit +Icon=desktop MimeType=application/x-knowit Patterns=*.kno; Type=MimeType -- cgit v1.2.1