From 9cd7ad39bd142ed1ff0cb597cfc8bb070438e0ad Mon Sep 17 00:00:00 2001 From: Patrick von Reth Date: Fri, 16 Jul 2010 10:37:29 +0200 Subject: [PATCH] added install targets, continued refactoring, added posibility to change notification backend --- CMakeLists.txt | 4 +- src/CMakeLists.txt | 11 ++-- src/core/CMakeLists.txt | 7 ++- src/core/application.cpp | 26 +++++++--- src/core/notification.h | 1 - src/core/snoreserver.cpp | 50 ++++++++++++------- src/core/snoreserver.h | 13 ++--- src/main.cpp | 2 +- src/plugins/CMakeLists.txt | 2 +- src/plugins/dbusbinding/CMakeLists.txt | 4 ++ src/plugins/dbusbinding/dbusbinding.cpp | 17 +++---- src/plugins/dbusbinding/dbusbinding.h | 1 - .../freedesktopfrontend/CMakeLists.txt | 4 ++ src/plugins/growl/CMakeLists.txt | 5 ++ src/plugins/growl/growl_backend.cpp | 8 +-- src/plugins/redirector/CMakeLists.txt | 5 +- src/plugins/redirector/redirector.cpp | 2 +- src/plugins/registredapps/CMakeLists.txt | 7 ++- src/plugins/registredapps/registredapps.cpp | 2 +- src/plugins/snarl/CMakeLists.txt | 5 ++ src/plugins/snarlnetwork/CMakeLists.txt | 4 ++ src/plugins/snarlnetwork/parser.cpp | 4 +- src/plugins/webposter/CMakeLists.txt | 4 ++ src/webinterface/CMakeLists.txt | 10 ++-- 24 files changed, 136 insertions(+), 62 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e159ff1..aad18a3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,7 +39,7 @@ if (CMAKE_COMPILER_IS_GNUCXX) endif(CMAKE_COMPILER_IS_GNUCXX) - - option(WITH_WEBINTERFACE "Buld with WebInterface" OFF) + + add_subdirectory(src) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a211681..92ce55d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -5,9 +5,14 @@ include_directories( add_subdirectory(core) -add_executable ( SnoreNotify main.cpp ) -target_link_libraries ( SnoreNotify snorecore ${QT_QTGUI_LIBRARY}) -add_dependencies(SnoreNotify snorecore) +add_executable ( snorenotify main.cpp ) +target_link_libraries ( snorenotify snorecore ${QT_QTGUI_LIBRARY}) +add_dependencies(snorenotify snorecore) + +install(TARGETS snorenotify RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) + add_subdirectory(webinterface) add_subdirectory(plugins) diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 33f51ac..1780074 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -16,9 +16,14 @@ set ( SnoreNotify_HDR ) automoc4_add_library( snorecore SHARED ${SnoreNotify_SRCS}) -set_target_properties( snorecore PROPERTIES COMPILE_FLAGS "-DSNORECORE_DLL" ) +set_target_properties( snorecore PROPERTIES OUTPUT_NAME "snore" COMPILE_FLAGS "-DSNORECORE_DLL" ) target_link_libraries ( snorecore ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ) + +install(TARGETS snorecore RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) + install(FILES ${SnoreNotify_HDR} DESTINATION include/snore) diff --git a/src/core/application.cpp b/src/core/application.cpp index 2edb448..f42d424 100644 --- a/src/core/application.cpp +++ b/src/core/application.cpp @@ -17,19 +17,33 @@ #include "application.h" -Application::Application(const QString &name):name(name){} +Application::Application(const QString &name):name(name) +{} -Application::Application():name("Error: Uninitialized Application"){} +Application::Application():name("Error: Uninitialized Application") +{} -void Application::addAlert(const QString &alert,const QString &title){ +void Application::addAlert(const QString &alert,const QString &title) +{ alerts.insert(alert,QSharedPointer(new Alert(alert,title))); } -Alert::Alert(const QString &name,const QString &title):name(name),title(title),active(true){} -Alert::Alert(const QString &name,const QString &title,bool active):name(name),title(title),active(active){} +Alert::Alert(const QString &name,const QString &title): + name(name), + title(title), + active(true) +{} -Alert::Alert():active(false){} +Alert::Alert(const QString &name,const QString &title,bool active): + name(name), + title(title), + active(active) +{} + +Alert::Alert(): + active(false) +{} diff --git a/src/core/notification.h b/src/core/notification.h index 080e827..984f6db 100644 --- a/src/core/notification.h +++ b/src/core/notification.h @@ -30,7 +30,6 @@ class SNORE_EXPORT Notification:public QObject { Q_OBJECT friend class SnoreServer; - friend class Notification_Frontend; public: static int DefaultTimeout; static QString toPlainText(const QString &string); diff --git a/src/core/snoreserver.cpp b/src/core/snoreserver.cpp index fe6e646..64b7a33 100644 --- a/src/core/snoreserver.cpp +++ b/src/core/snoreserver.cpp @@ -23,7 +23,7 @@ QString const SnoreServer::snoreTMP=QDir::temp().path()+"/SnoreNotify/"; -SnoreServer::SnoreServer():primaryNotificationBackend(0) +SnoreServer::SnoreServer():_notificationBackend(0) { qDebug()<<"Inititalized"; QDir home(snoreTMP); @@ -41,35 +41,37 @@ SnoreServer::SnoreServer():primaryNotificationBackend(0) } void SnoreServer::publicatePlugin(QObject *plugin){ - qDebug()<<"Loading plugin: "<property("name").value(); + QString pluginName(plugin->property("name").value()); + qDebug()<<"Loading plugin: "<(plugin); if(sp){ - plugins.insert(plugin->property("name").value(),plugin); + plugins.insert(pluginName,plugin); qDebug()<property("name").value()<<"is a SnorePlugin"; sp->setSnore(this); } Notification_Frontend *nf=qobject_cast(plugin); if(nf){ - qDebug()<property("name").value()<<"is a Notification_Frontend"; + qDebug()<setSnore(this); } Notification_Backend * nb=qobject_cast(plugin); if(nb){ - qDebug()<property("name").value()<<"is a Notification_Backend"; + qDebug()<isPrimaryNotificationBackend()){ - if(primaryNotificationBackend){ - notyfier.append(primaryNotificationBackend); - connect(this,SIGNAL(notify(QSharedPointer)),primaryNotificationBackend,SLOT(notify(QSharedPointer))); + if(_notificationBackend){ + _notyfier.insert(pluginName,nb); + _primaryNotificationBackends.insert(pluginName,nb); + connect(this,SIGNAL(notify(QSharedPointer)),_notificationBackend,SLOT(notify(QSharedPointer))); } - primaryNotificationBackend=nb; - primaryNotificationBackend->notify(QSharedPointer(new Notification(NULL,"Welcome","Snore Notify succesfully registred "+plugin->property("name").value(),""))); + _notificationBackend=nb; + _notificationBackend->notify(QSharedPointer(new Notification(NULL,"Welcome","Snore Notify succesfully registred "+plugin->property("name").value(),""))); }else{ - notyfier.append(nb); + _notyfier.insert(pluginName,nb); connect(this,SIGNAL(notify(QSharedPointer)),nb,SLOT(notify(QSharedPointer))); } connect(this,SIGNAL(closeNotify(int)),nb,SLOT(closeNotification(int))); @@ -80,8 +82,8 @@ void SnoreServer::publicatePlugin(QObject *plugin){ int SnoreServer::broadcastNotification(QSharedPointer notification){ emit notify(notification); qDebug()<<"Broadcasting notification:"<toString(); - if(primaryNotificationBackend!=NULL){ - notification->_id=primaryNotificationBackend->notify(notification); + if(_notificationBackend!=NULL){ + notification->_id=_notificationBackend->notify(notification); std::cout<<"Notification ID: "<_id).toLatin1().data()<_id; } @@ -104,24 +106,36 @@ void SnoreServer::notificationActionInvoked(QSharedPointer notific } void SnoreServer::addApplication(QSharedPointer application){ - applications.insert(application->name,application); + _applications.insert(application->name,application); emit applicationListChanged(); } bool SnoreServer::applicationListAlertIsActive(const QString &applicationName,const QString &alertName){ - return applications.contains(applicationName)&&applications.value(applicationName)->alerts.contains(alertName) - &&!applications.value(applicationName)->alerts.value(alertName)->active; + return _applications.contains(applicationName)&&_applications.value(applicationName)->alerts.contains(alertName) + &&!_applications.value(applicationName)->alerts.value(alertName)->active; } void SnoreServer::addAlert(const QString &appName,const QString &alertName, const QString &alertTitle){ - applications.value(appName)->addAlert(alertName,alertTitle); + _applications.value(appName)->addAlert(alertName,alertTitle); emit applicationListChanged(); } void SnoreServer::removeApplication(const QString& appName){ - applications.take(appName).clear(); + _applications.take(appName).clear(); emit applicationListChanged(); } +const ApplicationsList &SnoreServer::aplicationList() const{ + return _applications; +} + +const QHash &SnoreServer::primaryNotificationBackends()const{ + return _primaryNotificationBackends; +} + +void SnoreServer::setNotificationBackend(Notification_Backend *backend){ + _notificationBackend=backend; +} + #include "snoreserver.moc" diff --git a/src/core/snoreserver.h b/src/core/snoreserver.h index 6421f79..273b6d2 100644 --- a/src/core/snoreserver.h +++ b/src/core/snoreserver.h @@ -50,19 +50,20 @@ public: bool applicationListAlertIsActive(const QString &applicationName,const QString &alertName); void addAlert(const QString &appName,const QString &alertName, const QString &alertTitle); void removeApplication(const QString& appName); + const ApplicationsList &aplicationList() const; + const QHash &primaryNotificationBackends() const; + void setNotificationBackend(Notification_Backend *backend); - ApplicationsList* getAplicationList(){ - return &applications; - } QHash plugins; private: - ApplicationsList applications; + ApplicationsList _applications; - QList notyfier; - Notification_Backend * primaryNotificationBackend; + QHash _notyfier; + QHash _primaryNotificationBackends; + Notification_Backend * _notificationBackend; signals: diff --git a/src/main.cpp b/src/main.cpp index ecc9265..679323e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -11,7 +11,7 @@ int main(int argc, char *argv[]) QApplication a(argc, argv); SnoreServer s; - QDir pluginsDir(a.applicationDirPath()+"/plugins"); + QDir pluginsDir(a.applicationDirPath()+"/snoreplugins"); foreach (QString fileName, pluginsDir.entryList(QDir::Files)) { QPluginLoader loader(pluginsDir.absoluteFilePath(fileName)); QObject *plugin = loader.instance(); diff --git a/src/plugins/CMakeLists.txt b/src/plugins/CMakeLists.txt index c2947a7..87d207b 100644 --- a/src/plugins/CMakeLists.txt +++ b/src/plugins/CMakeLists.txt @@ -1,4 +1,4 @@ -SET(LIBRARY_OUTPUT_PATH ${EXECUTABLE_OUTPUT_PATH}/plugins) +SET(LIBRARY_OUTPUT_PATH ${EXECUTABLE_OUTPUT_PATH}/snoreplugins) add_subdirectory(freedesktopnotification) add_subdirectory(freedesktopfrontend) diff --git a/src/plugins/dbusbinding/CMakeLists.txt b/src/plugins/dbusbinding/CMakeLists.txt index 4cb9e8a..348744a 100644 --- a/src/plugins/dbusbinding/CMakeLists.txt +++ b/src/plugins/dbusbinding/CMakeLists.txt @@ -6,4 +6,8 @@ if(QT_QTDBUS_FOUND) ) automoc4_add_library(dbusbinding MODULE ${DBUSBINDING_SRC} ) target_link_libraries(dbusbinding ${QT_QTDBUS_LIBRARY} snorecore ) + + install(TARGETS dbusbinding RUNTIME DESTINATION bin/snoreplugins + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) endif(QT_QTDBUS_FOUND) diff --git a/src/plugins/dbusbinding/dbusbinding.cpp b/src/plugins/dbusbinding/dbusbinding.cpp index b158932..9de4e32 100644 --- a/src/plugins/dbusbinding/dbusbinding.cpp +++ b/src/plugins/dbusbinding/dbusbinding.cpp @@ -23,13 +23,17 @@ void DBusPlugin::setSnore(SnoreServer *snore){ new DBusBinding(this,snore); } -DBusBinding::DBusBinding(DBusPlugin* parent,SnoreServer* snore):QDBusAbstractAdaptor(parent),snore(snore){ +DBusBinding::DBusBinding(DBusPlugin* parent,SnoreServer* snore): + QDBusAbstractAdaptor(parent), + snore(snore) +{ registerTypes(); QDBusConnection dbus = QDBusConnection::sessionBus(); dbus.registerService( "org.SnoreNotify" ); dbus.registerObject( "/SnoreNotify", this ); connect(snore,SIGNAL(applicationListChanged()),this,SLOT(applicationListChangedSlot())); } + DBusBinding::~DBusBinding(){ QDBusConnection dbus = QDBusConnection::sessionBus(); dbus.unregisterService( "/SnoreNotify" ); @@ -43,20 +47,15 @@ void DBusBinding::registerTypes(){ qDBusRegisterMetaType(); } - -ApplicationsList DBusBinding::getApplicationList(){ - return *snore->getAplicationList(); -} - void DBusBinding::setAlertActive(const QString &application,const QString &name,const bool active){ - QSharedPointer ap(snore->getAplicationList()->value(application)); + QSharedPointer ap(snore->aplicationList().value(application)); ap->alerts.value(name)->active=active; - emit applicationListChanged(*snore->getAplicationList()); + emit applicationListChanged(snore->aplicationList()); } void DBusBinding::applicationListChangedSlot(){ - emit applicationListChanged(*snore->getAplicationList()); + emit applicationListChanged(snore->aplicationList()); } diff --git a/src/plugins/dbusbinding/dbusbinding.h b/src/plugins/dbusbinding/dbusbinding.h index db8ca26..ef637c0 100644 --- a/src/plugins/dbusbinding/dbusbinding.h +++ b/src/plugins/dbusbinding/dbusbinding.h @@ -43,7 +43,6 @@ private: QPointer snore; public slots: - ApplicationsList getApplicationList(); void setAlertActive(const QString &application,const QString &alert,const bool active); signals: diff --git a/src/plugins/freedesktopfrontend/CMakeLists.txt b/src/plugins/freedesktopfrontend/CMakeLists.txt index 58e6b2f..8d0e613 100644 --- a/src/plugins/freedesktopfrontend/CMakeLists.txt +++ b/src/plugins/freedesktopfrontend/CMakeLists.txt @@ -11,6 +11,10 @@ if(QT_QTDBUS_FOUND) automoc4_add_library(freedesktop_frontend MODULE ${FREEDESKTOP_NOTIFICATION_FRONTEND_SRC} ) target_link_libraries(freedesktop_frontend snorecore ${QT_QTDBUS_LIBRARY} ${QT_QTGUI_LIBRARY} ) + install(TARGETS freedesktop_frontend RUNTIME DESTINATION bin/snoreplugins + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) + endif(QT_QTDBUS_FOUND) diff --git a/src/plugins/growl/CMakeLists.txt b/src/plugins/growl/CMakeLists.txt index 51f651c..20480fc 100644 --- a/src/plugins/growl/CMakeLists.txt +++ b/src/plugins/growl/CMakeLists.txt @@ -7,6 +7,11 @@ if( GROWL_CPP ) ) automoc4_add_library(growl_backend MODULE ${GROWL__SRC} ) target_link_libraries(growl_backend snorecore ${QT_QTCORE_LIBRARY} ${GROWL_CPP} ) + + install(TARGETS growl_backend RUNTIME DESTINATION bin/snoreplugins + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) + else( GROWL_CPP ) message( STATUS "libgrowl not found..., get it here http://github.com/mattn/gntp-send" ) endif( GROWL_CPP ) diff --git a/src/plugins/growl/growl_backend.cpp b/src/plugins/growl/growl_backend.cpp index fdd69d3..6e8e9d0 100644 --- a/src/plugins/growl/growl_backend.cpp +++ b/src/plugins/growl/growl_backend.cpp @@ -29,11 +29,11 @@ Growl_Backend::~Growl_Backend(){ delete growl; } -int Growl_Backend::notify(QSharedPointernotification){ - QString title=Notification::toPlainText(notification->title); - QString text=Notification::toPlainText(notification->text); +int Growl_Backend::notify(QSharedPointer notification){ + QString title=Notification::toPlainText(notification->title()); + QString text=Notification::toPlainText(notification->text()); qDebug()<Notify("SnoreNotification",title.toLatin1().data(),text.toLatin1().data(),NULL,notification->getIcon().toLatin1().data()); + growl->Notify("SnoreNotification",title.toLatin1().data(),text.toLatin1().data(),NULL,notification->icon().toLatin1().data()); return ++id; } diff --git a/src/plugins/redirector/CMakeLists.txt b/src/plugins/redirector/CMakeLists.txt index 2740ee8..0e74159 100644 --- a/src/plugins/redirector/CMakeLists.txt +++ b/src/plugins/redirector/CMakeLists.txt @@ -3,5 +3,8 @@ if(WITH_WEBINTERFACE) redirector.cpp ) automoc4_add_library(redirector MODULE ${REDIRECTOR_SRC}) - target_link_libraries(redirector snorecore webinterface) + target_link_libraries(redirector snorecore snorewebinterface) + install(TARGETS redirector RUNTIME DESTINATION bin/snoreplugins + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) endif(WITH_WEBINTERFACE) diff --git a/src/plugins/redirector/redirector.cpp b/src/plugins/redirector/redirector.cpp index d9e3bfd..baa38bc 100644 --- a/src/plugins/redirector/redirector.cpp +++ b/src/plugins/redirector/redirector.cpp @@ -60,7 +60,7 @@ bool Redircetor::parseCommand(QTcpSocket *client, const QString &command){ subscriber->connectToHost(addres,port ,QTcpSocket::ReadWrite); if(subscriber->waitForConnected()){ SnoreServer* snore(getSnore()); - foreach(QSharedPointer a,snore->getAplicationList()->values()){ + foreach(QSharedPointer a,snore->aplicationList().values()){ QString* app=&a->name; subscriber->write(QString("type=SNP#?version=1.1#?action=register#?app="+*app+"\r\n").toUtf8()); foreach(const QSharedPointer al,a->alerts.values()){ diff --git a/src/plugins/registredapps/CMakeLists.txt b/src/plugins/registredapps/CMakeLists.txt index be54705..541f8bd 100644 --- a/src/plugins/registredapps/CMakeLists.txt +++ b/src/plugins/registredapps/CMakeLists.txt @@ -4,5 +4,10 @@ if(WITH_WEBINTERFACE) ) automoc4_add_library(registredapps MODULE ${REGISTREDAPPS_SRC} ) - target_link_libraries(registredapps snorecore webinterface) + target_link_libraries(registredapps snorecore snorewebinterface) + + install(TARGETS registredapps RUNTIME DESTINATION bin/snoreplugins + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) + endif(WITH_WEBINTERFACE) diff --git a/src/plugins/registredapps/registredapps.cpp b/src/plugins/registredapps/registredapps.cpp index 0d18464..c5c98f8 100644 --- a/src/plugins/registredapps/registredapps.cpp +++ b/src/plugins/registredapps/registredapps.cpp @@ -32,7 +32,7 @@ bool RegistredApps::parseCommand(QTcpSocket *client, const QString &command){ QString out; out+="Registred Applications\n"; SnoreServer *snore=getSnore(); - foreach(QSharedPointer a,snore->getAplicationList()->values()){ + foreach(QSharedPointer a,snore->aplicationList().values()){ out+=a->name+"\n"; out+="Registred alerts of "+a->name+"\t alert\t title \t is Active\n"; foreach(const QSharedPointer al,a->alerts.values()) diff --git a/src/plugins/snarl/CMakeLists.txt b/src/plugins/snarl/CMakeLists.txt index ef596a9..141c219 100644 --- a/src/plugins/snarl/CMakeLists.txt +++ b/src/plugins/snarl/CMakeLists.txt @@ -6,4 +6,9 @@ if(WIN32) ) automoc4_add_library(snarln_backend MODULE ${SNARL__SRC} ) target_link_libraries(snarln_backend snorecore ${QT_QTCORE_LIBRARY} ) + + install(TARGETS snarln_backend RUNTIME DESTINATION bin/snoreplugins + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) + endif(WIN32) diff --git a/src/plugins/snarlnetwork/CMakeLists.txt b/src/plugins/snarlnetwork/CMakeLists.txt index f0b8d1d..04c8444 100644 --- a/src/plugins/snarlnetwork/CMakeLists.txt +++ b/src/plugins/snarlnetwork/CMakeLists.txt @@ -4,3 +4,7 @@ set( SNARL_NETWORK_SRC ) automoc4_add_library(snarlnetwork MODULE ${SNARL_NETWORK_SRC} ) target_link_libraries(snarlnetwork snorecore ${QT_QTNETWORK_LIBRARY} ) + +install(TARGETS snarlnetwork RUNTIME DESTINATION bin/snoreplugins + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) diff --git a/src/plugins/snarlnetwork/parser.cpp b/src/plugins/snarlnetwork/parser.cpp index 55b4822..080ff69 100644 --- a/src/plugins/snarlnetwork/parser.cpp +++ b/src/plugins/snarlnetwork/parser.cpp @@ -132,8 +132,8 @@ SnarlNotification Parser::parse(QString &msg,QTcpSocket* client){ snarl->getSnore()->addAlert(sNotification.notification->application(),alert,title); break; case REGISTER: - qDebug()<getSnore()->getAplicationList()->keys(); - if(!snarl->getSnore()->getAplicationList()->contains(sNotification.notification->application())&&!sNotification.notification->application().isEmpty()){ + qDebug()<getSnore()->aplicationList().keys(); + if(!snarl->getSnore()->aplicationList().contains(sNotification.notification->application())&&!sNotification.notification->application().isEmpty()){ snarl->getSnore()->addApplication(QSharedPointer(new Application(sNotification.notification->application()))); } else diff --git a/src/plugins/webposter/CMakeLists.txt b/src/plugins/webposter/CMakeLists.txt index 4444e82..0c53d7c 100644 --- a/src/plugins/webposter/CMakeLists.txt +++ b/src/plugins/webposter/CMakeLists.txt @@ -3,3 +3,7 @@ set( WEBPOSTER_SRC ) automoc4_add_library(webposter MODULE ${WEBPOSTER_SRC} ) target_link_libraries(webposter snorecore ${QT_QTNETWORK_LIBRARY} ) + +install(TARGETS webposter RUNTIME DESTINATION bin/snoreplugins + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) diff --git a/src/webinterface/CMakeLists.txt b/src/webinterface/CMakeLists.txt index ec363ed..d034abd 100644 --- a/src/webinterface/CMakeLists.txt +++ b/src/webinterface/CMakeLists.txt @@ -3,8 +3,12 @@ if(WITH_WEBINTERFACE) set( WEBINTERFACE_SRC webinterface.cpp ) - automoc4_add_library(webinterface SHARED ${WEBINTERFACE_SRC} ) - set_target_properties( webinterface PROPERTIES COMPILE_FLAGS "-DWEBINTERFACE_DLL" ) - target_link_libraries(webinterface snorecore ${QT_QTNETWORK_LIBRARY} ) + automoc4_add_library(snorewebinterface SHARED ${WEBINTERFACE_SRC} ) + set_target_properties( snorewebinterface PROPERTIES COMPILE_FLAGS "-DWEBINTERFACE_DLL" ) + target_link_libraries(snorewebinterface snorecore ${QT_QTNETWORK_LIBRARY} ) + + install(TARGETS snorewebinterface RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) endif(WITH_WEBINTERFACE)