Skip to content

Commit

Permalink
[core] Make Theme class public
Browse files Browse the repository at this point in the history
  • Loading branch information
neochapay committed Feb 5, 2025
1 parent 202d55d commit 8bede0e
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 7 deletions.
23 changes: 17 additions & 6 deletions src/core/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
set(PACKAGE nemocoreplugin)

set(SRC
sizing.cpp
nemoimageprovider.cpp
Expand All @@ -11,41 +13,50 @@ set(HEADERS
nemoimageprovider.h
plugin.h
sizing.h
theme.h
logging.h
themedaemon/mlocalthemedaemonclient.h
themedaemon/mabstractthemedaemonclient.h)

add_library(nemocoreplugin SHARED ${SRC} ${MLITE})
set(PUBLIC_HEADERS
theme.h)

add_library(${PACKAGE} SHARED ${SRC} ${MLITE})
add_definitions( -DQT_INSTALL_QML="${QT_INSTALL_QML}")

qt6_add_qml_module(nemocoreplugin
qt6_add_qml_module(${PACKAGE}
URI Nemo
VERSION 2.0
PLUGIN_TARGET nemocoreplugin
PLUGIN_TARGET ${PACKAGE}
NO_GENERATE_PLUGIN_SOURCE
SOURCES
${SOURCES}
${HEADERS}
${PUBLIC_HEADERS}
QML_FILES
${QML}
OUTPUT_DIRECTORY
${CMAKE_BINARY_DIR}/Nemo
)

target_link_libraries(nemocoreplugin PUBLIC
target_link_libraries(${PACKAGE} PUBLIC
Qt6::Core
Qt6::Qml
Qt6::Quick
PkgConfig::MLITE)

configure_file(${PACKAGE}.pc.in ${PACKAGE}.pc @ONLY)

install(TARGETS nemocoreplugin
install(TARGETS ${PACKAGE}
RUNTIME DESTINATION "${QT_INSTALL_QML}/Nemo/"
BUNDLE DESTINATION "${QT_INSTALL_QML}/Nemo/"
LIBRARY DESTINATION "${QT_INSTALL_QML}/Nemo/"
)

install(FILES ${PUBLIC_HEADERS}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/nemocontrols/core/)

install(FILES qmldir
DESTINATION ${QT_INSTALL_QML}/Nemo/)

install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PACKAGE}.pc
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
10 changes: 10 additions & 0 deletions src/core/nemocoreplugin.pc.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
prefix="@CMAKE_INSTALL_PREFIX@"
exec_prefix=${prefix}
libdir=${prefix}/lib
includedir=${prefix}/include/nemocontrols/core

Name: @PROJECT_NAME@
Description: @CMAKE_PROJECT_DESCRIPTION@
Version: @PROJECT_VERSION@
Libs: -lnemocoreplugin
Cflags: -I${includedir}
1 change: 1 addition & 0 deletions src/core/plugin.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "plugin.h"
#include "nemoimageprovider.h"
#include "theme.h"
#include "sizing.h"
#include <QtQml>

void QQuickNemoControlsExtensionPlugin::registerTypes(const char* uri)
Expand Down
2 changes: 2 additions & 0 deletions src/core/theme.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

#include "theme.h"
#include "logging.h"
#include "sizing.h"

#include <QFile>
#include <QJsonDocument>
#include <QJsonObject>
Expand Down
3 changes: 2 additions & 1 deletion src/core/theme.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#ifndef THEME_H
#define THEME_H

#include "sizing.h"
#include <MGConfItem>
#include <QObject>

class Sizing;

class Theme : public QObject {
Q_OBJECT

Expand Down

0 comments on commit 8bede0e

Please sign in to comment.