From 92b3c2dcff3e85ad3d455f6ab845d9a97d3b525b Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Mon, 7 Dec 2020 12:22:15 +0200 Subject: Rewrite meson build scripts into cmakelists --- src/about/CMakeLists.txt | 11 +++++++++++ src/about/aboutdialog.cpp | 6 +++--- src/about/meson.build | 21 --------------------- src/about/test/main.cpp | 8 ++++---- 4 files changed, 18 insertions(+), 28 deletions(-) create mode 100644 src/about/CMakeLists.txt delete mode 100644 src/about/meson.build (limited to 'src/about') diff --git a/src/about/CMakeLists.txt b/src/about/CMakeLists.txt new file mode 100644 index 0000000..027d509 --- /dev/null +++ b/src/about/CMakeLists.txt @@ -0,0 +1,11 @@ +add_library(about_dialog INTERFACE) +target_sources(about_dialog INTERFACE aboutdialog.h aboutdialog.cpp aboutdialog.ui) +target_include_directories(about_dialog INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) +target_link_libraries(about_dialog INTERFACE autogen Qt5::Widgets Qt5::Svg) + +add_library(about_plugin INTERFACE) +target_sources(about_plugin INTERFACE aboutplugin.h aboutplugin.cpp aboutplugin.ui) + +add_executable(test_about test/main.cpp) +target_link_libraries(test_about PRIVATE about_dialog Catch2::Catch2) +target_sanitize(test_about) \ No newline at end of file diff --git a/src/about/aboutdialog.cpp b/src/about/aboutdialog.cpp index 6fa4127..643b87c 100644 --- a/src/about/aboutdialog.cpp +++ b/src/about/aboutdialog.cpp @@ -7,9 +7,9 @@ */ #include "aboutdialog.h" -#include "../poi_logos.h" +#include "poi_logos.h" #include "ui_aboutdialog.h" -#include +#include "version.h" // compiler // clang also defines __GNUC__, so we need to check for clang first @@ -55,7 +55,7 @@ AboutDialog::AboutDialog(QWidget *parent) "

This program is distributed in the hope that it will be useful, but without any warranty.

" "

You can read the full terms of the license on the GNU website.

")); - ui->detailsLabel->setText(tr("

Version " poi_Version "

" + ui->detailsLabel->setText(tr("

Version " POI_VERSION "

" "

Compiled with " compiler "

" "

Libraries: