Linux + iPhone Continuity / iMessage / SMS
rename
Zack Bartelccdc54ba2c9a
diff --git a/src/cli/CMakeLists.txt b/src/cli/CMakeLists.txtindex 6f08fbd..88fd98e 100644--- a/src/cli/CMakeLists.txt+++ b/src/cli/CMakeLists.txt@@ -1,8 +1,11 @@-add_executable(tether+add_executable(tether_climain.cpp)-target_link_libraries(tether PRIVATE tether_core)+target_link_libraries(tether_cli PRIVATE tether)# Output into root build dir instead of nested build/src/cli-set_target_properties(tether PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}")+set_target_properties(tether_cli PROPERTIES+ OUTPUT_NAME tether+ RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}"+)diff --git a/src/cli/main.cpp b/src/cli/main.cppindex 2123889..883d3b1 100644--- a/src/cli/main.cpp+++ b/src/cli/main.cpp@@ -237,7 +237,11 @@ int main(int argc, char* argv[]) {j["command"] = "clipboard_set";j["content"] = arg_val;std::string payload = j.dump() + "\n";- send_and_wait(payload);+ std::string s_resp = send_and_wait(payload);+ if (s_resp.find("unauthorized") != std::string::npos) {+ std::cerr << "Unauthorized. Device not paired.\n";+ return 1;+ }} else if (action == "file") {if (arg_val.empty() || !std::filesystem::exists(arg_val)) {std::cerr << "Invalid or missing file path: " << arg_val << "\n";diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txtindex e6492d6..eee5fa0 100644--- a/src/core/CMakeLists.txt+++ b/src/core/CMakeLists.txt@@ -1,4 +1,4 @@-add_library(tether_core STATIC+add_library(tether STATICsrc/core.cppsrc/event_loop.cppsrc/net.cpp@@ -11,11 +11,11 @@ add_library(tether_core STATICsrc/wayland_protocols/wlr-data-control-unstable-v1.cpp)-target_include_directories(tether_core PUBLIC+target_include_directories(tether PUBLICinclude)-target_link_libraries(tether_core PUBLIC+target_link_libraries(tether PUBLICnlohmann_json::nlohmann_jsonPkgConfig::WAYLANDOpenSSL::SSLdiff --git a/src/daemon/CMakeLists.txt b/src/daemon/CMakeLists.txtindex 73b804b..cd5f2e0 100644--- a/src/daemon/CMakeLists.txt+++ b/src/daemon/CMakeLists.txt@@ -2,7 +2,7 @@ add_executable(tetherdmain.cpp)-target_link_libraries(tetherd PRIVATE tether_core)+target_link_libraries(tetherd PRIVATE tether)# Output into root build dir instead of nested build/src/daemonset_target_properties(tetherd PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}")diff --git a/src/gtk/CMakeLists.txt b/src/gtk/CMakeLists.txtindex 437f2b2..7fd4a3a 100644--- a/src/gtk/CMakeLists.txt+++ b/src/gtk/CMakeLists.txt@@ -2,7 +2,7 @@ add_executable(tether-gtkmain.cpp)-target_link_libraries(tether-gtk PRIVATE tether_core)+target_link_libraries(tether-gtk PRIVATE tether)# Output into root build dir instead of nested build/src/gtkset_target_properties(tether-gtk PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}")diff --git a/test/CMakeLists.txt b/test/CMakeLists.txtindex 4a861f1..5c8843e 100644--- a/test/CMakeLists.txt+++ b/test/CMakeLists.txt@@ -9,7 +9,7 @@ target_include_directories(tether_test PRIVATE)target_link_libraries(tether_test PRIVATE- tether_core+ tetherGTest::gtest_main)