diff --git a/conftool/CMakeLists.txt b/conftool/CMakeLists.txt index 0bf4af2d7c9039c8aeb7c4c3614715f411775bd2..fde0ecb07edd1923c4f774d1faa15bdd6d280dc6 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()