diff --git a/.gitmodules b/.gitmodules index 7842965..e69de29 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +0,0 @@ -[submodule "3rdparty/kirigami"] - path = 3rdparty/kirigami - url = git://anongit.kde.org/kirigami.git -[submodule "3rdparty/breeze-icons"] - path = 3rdparty/breeze-icons - url = git://anongit.kde.org/breeze-icons diff --git a/3rdparty/CMakeLists.txt b/3rdparty/CMakeLists.txt deleted file mode 100644 index 3bb0919..0000000 --- a/3rdparty/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -option(STATIC_LIBRARY "" ON) - -add_subdirectory(kirigami) diff --git a/3rdparty/breeze-icons b/3rdparty/breeze-icons deleted file mode 160000 index 3eeb52f..0000000 --- a/3rdparty/breeze-icons +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 3eeb52f15eaf5411dd783365f0d593cd1081672d diff --git a/3rdparty/kirigami b/3rdparty/kirigami deleted file mode 160000 index 33e26b7..0000000 --- a/3rdparty/kirigami +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 33e26b788cebe4961b02a931fb99dcde8f575c0c diff --git a/CMakeLists.txt b/CMakeLists.txt index 678f676..8b662dd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,25 +1,28 @@ project(kairo) cmake_minimum_required(VERSION 3.2) if (POLICY CMP0063) cmake_policy(SET CMP0063 NEW) endif() find_package(ECM REQUIRED CONFIG) set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/ ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH}) find_package(Qt5 REQUIRED Core Quick Multimedia Test) include(KDEInstallDirs) include(KDECompilerSettings) include(KDECMakeSettings) +include(FeatureSummary) set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_EXTENSIONS OFF) -add_definitions(-DKIRIGAMI_BUILD_TYPE_STATIC) +find_package(KF5Kirigami2 ${REQUIRED_KF5_VERSION} CONFIG QUIET) +set_package_properties(KF5Kirigami2 PROPERTIES + DESCRIPTION "KF5 Kirigami 2 is needed to provide the mobile UI components." + TYPE REQUIRED) -add_subdirectory(3rdparty) add_subdirectory(src) add_subdirectory(tests) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0acced4..8671d0a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,31 +1,31 @@ set(lib_SRCS circuitcontrol.cpp circuitlistmodel.cpp circuitmodel.cpp circuitreader.cpp timercontrol.cpp timermodel.cpp timernotificationcontrol.cpp soundcontrolinterface.cpp soundcontrol.cpp soundcontrolstub.cpp ) add_library(kairolib STATIC ${lib_SRCS}) target_link_libraries(kairolib Qt5::Quick Qt5::Multimedia ) set(exec_SRCS main.cpp ) qt5_add_resources(exec_SRCS main.qrc ) include_directories(${CMAKE_SOURCE_DIR}/3rdparty/kirigami/src) add_executable(kairo ${exec_SRCS}) -target_link_libraries(kairo kairolib kirigamiplugin) +target_link_libraries(kairo kairolib) install(TARGETS kairo DESTINATION ${KDE_INSTALL_BINDIR}) diff --git a/src/main.cpp b/src/main.cpp index 86d453e..767b6d2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,58 +1,53 @@ /* This file is part of Kairo Timer Copyright 2016 Kevin Ottens This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License or (at your option) version 3 or any later version accepted by the membership of KDE e.V. (or its successor approved by the membership of KDE e.V.), which shall act as a proxy defined in Section 14 of version 3 of the license. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include #include -#include "kirigamiplugin.h" - #include "circuitcontrol.h" #include "circuitlistmodel.h" #include "circuitmodel.h" #include "timercontrol.h" #include "timermodel.h" #include "timernotificationcontrol.h" #include "soundcontrol.h" int main(int argc, char **argv) { QGuiApplication app(argc, argv); app.setApplicationName("Kairo"); - Q_INIT_RESOURCE(kirigami); - KirigamiPlugin::registerTypes(); - qmlRegisterType("Kairo", 1, 0, "CircuitListModel"); qmlRegisterUncreatableType("Kairo", 1, 0, "CircuitModel", "Loaded from C++"); qmlRegisterType("Kairo", 1, 0, "CircuitControl"); qmlRegisterUncreatableType("Kairo", 1, 0, "TimerModel", "Use TimerControl.createModel()"); qmlRegisterType("Kairo", 1, 0, "TimerControl"); qmlRegisterType("Kairo", 1, 0, "TimerNotificationControl"); qmlRegisterUncreatableType("Kairo", 1, 0, "SoundControlInterface", "Use SoundControl"); qmlRegisterType("Kairo", 1, 0, "SoundControl"); QQmlApplicationEngine engine; engine.load(QUrl(QStringLiteral("qrc:/main.qml"))); return app.exec(); }