Added the neccessary CMake magic to optionally change the API.

This commit is contained in:
mox
2016-04-22 12:10:07 +02:00
parent 8882c4f436
commit 439740abc3
3 changed files with 19 additions and 6 deletions

View File

@@ -4,7 +4,9 @@
#include <iostream>
#include <auss.hpp>
#ifndef I3IPCpp_USE_FULL_SIGNALS
#include <json/json.h>
#endif
#include "log.hpp"
#include "ipc-util.hpp"
@@ -80,7 +82,7 @@ I3Connection::I3Connection(const std::string& socket_path) : m_main_socket(i3_c
case ET_WORKSPACE: {
Json::Value root;
IPC_JSON_READ(root);
#ifdef USE_FULL_SIGNALS
#ifdef I3IPCpp_USE_FULL_SIGNALS
signal_workspace_event.emit(root);
#else
WorkspaceEventType type;
@@ -114,7 +116,7 @@ I3Connection::I3Connection(const std::string& socket_path) : m_main_socket(i3_c
case ET_WINDOW: {
Json::Value root;
IPC_JSON_READ(root);
#ifdef USE_FULL_SIGNALS
#ifdef I3IPCpp_USE_FULL_SIGNALS
signal_window_event.emit(root);
#else
WindowEventType type;