Organized source tree
This commit is contained in:
@@ -5,6 +5,10 @@ include(FetchContent)
|
|||||||
FetchContent_Declare(json URL https://github.com/nlohmann/json/releases/download/v3.12.0/json.tar.xz)
|
FetchContent_Declare(json URL https://github.com/nlohmann/json/releases/download/v3.12.0/json.tar.xz)
|
||||||
FetchContent_MakeAvailable(json)
|
FetchContent_MakeAvailable(json)
|
||||||
|
|
||||||
add_executable(htt main.cpp HyprlandService.cpp Workspace.cpp Client.cpp)
|
add_executable(htt
|
||||||
|
src/main.cpp
|
||||||
|
src/HyprlandService.cpp
|
||||||
|
src/Workspace.cpp
|
||||||
|
src/Client.cpp)
|
||||||
target_link_libraries(htt PRIVATE nlohmann_json::nlohmann_json)
|
target_link_libraries(htt PRIVATE nlohmann_json::nlohmann_json)
|
||||||
target_include_directories(htt PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
|
target_include_directories(htt PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#include "Client.h"
|
#include "../include/Client.h"
|
||||||
|
|
||||||
void from_json(const json& j, WorkspaceSignature& ws) {
|
void from_json(const json& j, WorkspaceSignature& ws) {
|
||||||
j.at("id").get_to(ws.id);
|
j.at("id").get_to(ws.id);
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
#include "HyprlandService.h"
|
#include "../include/HyprlandService.h"
|
||||||
|
|
||||||
using json = nlohmann::json;
|
using json = nlohmann::json;
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
#include "Workspace.h"
|
#include "../include/Workspace.h"
|
||||||
|
|
||||||
void from_json(const nlohmann::json &j, Workspace &w) {
|
void from_json(const nlohmann::json &j, Workspace &w) {
|
||||||
j.at("id").get_to(w.id);
|
j.at("id").get_to(w.id);
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include "HyprlandService.h"
|
#include "../include/HyprlandService.h"
|
||||||
|
|
||||||
int main(int, char**){
|
int main(int, char**){
|
||||||
Workspace w = HyprlandService::getCurrentWorkspace();
|
Workspace w = HyprlandService::getCurrentWorkspace();
|
||||||
Reference in New Issue
Block a user