From e6136d6f7d0620bfdda743e23604dfedd6a30a35 Mon Sep 17 00:00:00 2001
From: dmitry <dmitry.puzyrkov@demlabs.net>
Date: Thu, 25 Jul 2024 11:32:31 +0700
Subject: [PATCH] [*] conftool build fix

---
 conftool/CMakeLists.txt | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/conftool/CMakeLists.txt b/conftool/CMakeLists.txt
index 0bf4af2d7..fde0ecb07 100644
--- a/conftool/CMakeLists.txt
+++ b/conftool/CMakeLists.txt
@@ -4,6 +4,7 @@ include(FetchContent)
 
 project(cellframe-node-config)
 
+
 add_executable(${PROJECT_NAME} ./main.cpp 
                                 ./commands/abstractcommand.cpp 
                                 ./commands/networkcommand.cpp
@@ -14,9 +15,7 @@ add_executable(${PROJECT_NAME} ./main.cpp
                                 ./commands/fromtemplatecommand.cpp
                                 ./config/cellframeconfigfile.cpp
                                 ./service/service_win.cpp
-                                ./service/service_linux.cpp
-                                ./service/service_macos.cpp
-                                ./service/macos_auth.m)
+                                ./service/service_linux.cpp)
 
 target_link_libraries(cellframe-node-config
 )
@@ -26,7 +25,14 @@ if (LINUX OR WIN32)
 endif()
 
 if (APPLE)
-target_link_libraries(cellframe-node-config PUBLIC "-framework Security -framework Foundation")
+
+  target_link_libraries(cellframe-node-config PUBLIC "-framework Security -framework Foundation")
+
+  add_library(conftool_osx_ctrl STATIC ./service/service_macos.cpp ./service/macos_auth.m)
+    set_target_properties(conftool_osx_ctrl PROPERTIES
+     LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
+  target_link_libraries(cellframe-node-config PUBLIC conftool_osx_ctrl)
+
 endif()
 
 
-- 
GitLab