Skip to content

Commit

Permalink
[Search] Move to libs
Browse files Browse the repository at this point in the history
  • Loading branch information
neochapay committed Jul 16, 2024
1 parent 4522d98 commit 78f771e
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 11 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ find_package(KF6BluezQt REQUIRED)
add_definitions(-DBLUEZQT_VERSION_MAJOR=${KF6BluezQt_VERSION_MAJOR})
add_definitions(-DBLUEZQT_VERSION_MINOR=${KF6BluezQt_VERSION_MINOR})

add_subdirectory(lib)
add_subdirectory(src)
add_subdirectory(settings-plugins)

Expand Down
1 change: 1 addition & 0 deletions lib/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
add_subdirectory(search)
24 changes: 24 additions & 0 deletions lib/search/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
set(PROJECT glacierhomesearch)

set(SRC
searchpluginmanager.h
searchpluginmanager.cpp)

set(PUBLIC_HEADERS
glaciersearchplugin.h)

include_directories(${CMAKE_SOURCE_DIR}/src)

add_library(${PROJECT} SHARED ${SRC} ${HEADERS} ${PUBLIC_HEADERS})
add_library(GlacierHome::Search ALIAS ${PROJECT})

target_link_libraries(${PROJECT}
Qt6::Core)

set_target_properties(${PROJECT} PROPERTIES VERSION 0.1 SOVERSION 0)

install(TARGETS ${PROJECT}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/)

install(FILES ${PUBLIC_HEADERS}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/glacier-home)
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@
#ifndef GLACIERSEARCHPLUGIN_H
#define GLACIERSEARCHPLUGIN_H

#include "../glacier_global.h"
#include <glacier_global.h>
#include <QObject>
#include <QMap>
#include <QVariant>

class GLACIER_EXPORT GlacierSearchPlugin : public QObject {
Q_OBJECT
Expand Down
File renamed without changes.
File renamed without changes.
13 changes: 4 additions & 9 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,7 @@ set(SRC
models/controlcenterbuttonsmodel.h
models/searchmodel.h
models/searchmodel.cpp
search/searchpluginmanager.h
search/searchpluginmanager.cpp
${QML_JS_FILES}
)

set(PUBLIC_HEADERS
search/glaciersearchplugin.h)
${QML_JS_FILES})

#add_custom_command(OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/geoagent.h ${CMAKE_CURRENT_SOURCE_DIR}/geoagent.cpp
# DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/org.freedesktop.GeoClue2.Agent.xml
Expand All @@ -45,11 +39,14 @@ endif()

add_executable(lipstick ${SRC} ${GEOCLUE_SRC} ${PUBLIC_HEADERS})

include_directories(${CMAKE_SOURCE_DIR}/lib)

target_link_libraries(lipstick PUBLIC
Qt6::Gui
Qt6::Qml
Qt6::Quick
Qt6::DBus
GlacierHome::Search
PkgConfig::LIPSTICK
PkgConfig::MLITE6
PkgConfig::NEMODEVICELOCK
Expand All @@ -62,5 +59,3 @@ install(TARGETS lipstick RUNTIME
DESTINATION ${CMAKE_INSTALL_BINDIR})
install(DIRECTORY qml
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/glacier-home)
install(FILES ${PUBLIC_HEADERS}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/glacier-home)
2 changes: 1 addition & 1 deletion src/models/searchmodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <QAbstractListModel>
#include <QObject>

#include "search/searchpluginmanager.h"
#include <search/searchpluginmanager.h>

class SearchModel : public QAbstractListModel {
Q_OBJECT
Expand Down

0 comments on commit 78f771e

Please sign in to comment.