Commit da5c9bd3 authored by Hannah von Reth's avatar Hannah von Reth

Fix compilation on Windows.

parent 5795e271
add_executable(kdeconnect-cli kdeconnect-cli.cpp)
ecm_mark_nongui_executable(kdeconnect-cli)
target_link_libraries(kdeconnect-cli kdeconnectinterfaces KF5::CoreAddons KF5::I18n)
......
......@@ -48,6 +48,6 @@ set_target_properties(kdeconnectcore PROPERTIES
)
target_include_directories(kdeconnectcore PUBLIC ${CMAKE_CURRENT_BINARY_DIR})
generate_export_header(kdeconnectcore EXPORT_FILE_NAME ${CMAKE_CURRENT_BINARY_DIR}/kdeconnectcore_export.h BASE_NAME KDEConnectCore)
generate_export_header(kdeconnectcore EXPORT_FILE_NAME kdeconnectcore_export.h BASE_NAME KDEConnectCore)
install(TARGETS kdeconnectcore EXPORT kdeconnectLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS} LIBRARY NAMELINK_SKIP)
......@@ -21,11 +21,6 @@
#include "landevicelink.h"
#include "core_debug.h"
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <netdb.h>
#include "../linkprovider.h"
#include "uploadjob.h"
#include "downloadjob.h"
......
......@@ -21,10 +21,12 @@
#include "lanlinkprovider.h"
#include "core_debug.h"
#ifndef Q_OS_WIN
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <netdb.h>
#endif
#include <QHostInfo>
#include <QTcpServer>
......
......@@ -7,6 +7,8 @@ add_definitions(-DTRANSLATION_DOMAIN="kdeconnect-kded")
add_executable(kdeconnectd kdeconnectd.cpp)
target_link_libraries(kdeconnectd kdeconnectcore KF5::KIOWidgets KF5::DBusAddons KF5::Notifications KF5::I18n Qt5::Widgets)
ecm_mark_nongui_executable(kdeconnectd)
configure_file(kdeconnectd.desktop.cmake ${CMAKE_CURRENT_BINARY_DIR}/kdeconnectd.desktop)
configure_file(org.kde.kdeconnect.service.in ${CMAKE_CURRENT_BINARY_DIR}/org.kde.kdeconnect.service)
......
......@@ -18,7 +18,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <sys/socket.h>
#include <unistd.h>
#include <signal.h>
......@@ -35,9 +34,19 @@
#include "core/device.h"
#include "kdeconnect-version.h"
#ifndef Q_OS_WIN
#include <sys/socket.h>
#endif
static int sigtermfd[2];
const static char deadbeef = 1;
// TODO: Implement for Windows.
#ifndef Q_OS_WIN
struct sigaction action;
#endif
void sighandler(int signum)
{
......@@ -50,6 +59,8 @@ void sighandler(int signum)
void initializeTermHandlers(QCoreApplication* app, Daemon* daemon)
{
// TODO: Implement for Windows.
#ifndef Q_OS_WIN
::socketpair(AF_UNIX, SOCK_STREAM, 0, sigtermfd);
QSocketNotifier* snTerm = new QSocketNotifier(sigtermfd[1], QSocketNotifier::Read, app);
QObject::connect(snTerm, SIGNAL(activated(int)), daemon, SLOT(deleteLater()));
......@@ -60,6 +71,7 @@ void initializeTermHandlers(QCoreApplication* app, Daemon* daemon)
sigaction(SIGTERM, &action, nullptr);
sigaction(SIGINT, &action, nullptr);
#endif
}
class DesktopDaemon : public Daemon
......
......@@ -22,7 +22,7 @@ set_target_properties(kdeconnectpluginkcm PROPERTIES
)
target_include_directories(kdeconnectpluginkcm PUBLIC ${CMAKE_CURRENT_BINARY_DIR})
generate_export_header(kdeconnectpluginkcm EXPORT_FILE_NAME ${CMAKE_CURRENT_BINARY_DIR}../core/kdeconnectcore_export.h BASE_NAME kdeconnectpluginkcm)
generate_export_header(kdeconnectpluginkcm EXPORT_FILE_NAME kdeconnectpluginkcm_export.h BASE_NAME kdeconnectpluginkcm)
# Remove NAMELINK_SKIP if/when headers are being installed and the library
# becomes public.
......
......@@ -23,8 +23,8 @@
#include <KCModule>
#include "core/kdeconnectcore_export.h"
#include "core/kdeconnectpluginconfig.h"
#include "kdeconnectpluginkcm_export.h"
struct KdeConnectPluginKcmPrivate;
......@@ -32,7 +32,7 @@ struct KdeConnectPluginKcmPrivate;
* Inheriting your plugin's KCM from this class gets you a easy way to share
* configuration values between the KCM and the plugin.
*/
class KDECONNECTCORE_EXPORT KdeConnectPluginKcm
class KDECONNECTPLUGINKCM_EXPORT KdeConnectPluginKcm
: public KCModule
{
Q_OBJECT
......
......@@ -8,7 +8,9 @@ add_subdirectory(mpriscontrol)
add_subdirectory(clipboard)
add_subdirectory(telephony)
add_subdirectory(battery)
add_subdirectory(mousepad)
if(NOT WIN32)
add_subdirectory(mousepad)
endif()
add_subdirectory(share)
add_subdirectory(notifications)
add_subdirectory(sftp)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment