From 4c47d49f934677d269156f185e68537cc7d84b51 Mon Sep 17 00:00:00 2001 From: Mike Nolan Date: Fri, 6 Dec 2024 05:28:27 -0600 Subject: [PATCH] first commit --- CMakeLists.txt | 18 ++++++++++++------ {examples => apps}/tfetch.cpp | 0 .../fileserver.cpp => apps/tfileserver.cpp | 0 3 files changed, 12 insertions(+), 6 deletions(-) rename {examples => apps}/tfetch.cpp (100%) rename examples/fileserver.cpp => apps/tfileserver.cpp (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 643e6fe..fb7e9df 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,6 +35,7 @@ set(TESSESFRAMEWORK_CERT_BUNDLE_FILE "/etc/ssl/certs/ca-certificates.crt") option(TESSESFRAMEWORK_EMBED_CERT_BUNDLE "Embed the certificate chain bundle" ON) option(TESSESFRAMEWORK_ENABLE_MBED "Enable Tesses Framework mbedtls" ON) option(TESSESFRAMEWORK_ENABLE_EXAMPLES "Enable Tesses Framework examples" ON) +option(TESSESFRAMEWORK_ENABLE_APPS "Enable Tesses Framework cli apps" ON) option(TESSESFRAMEWORK_ENABLE_STATIC "Enable Tesses Framework Static Libraries" ON) option(TESSESFRAMEWORK_ENABLE_SHARED "Enable Tesses Framework Shared Libraries" ON) @@ -132,9 +133,6 @@ if(TESSESFRAMEWORK_ENABLE_EXAMPLES) add_executable(copyfile examples/copyfile.cpp) target_link_libraries(copyfile PUBLIC tessesframework) - - add_executable(fileserver examples/fileserver.cpp) - target_link_libraries(fileserver PUBLIC tessesframework) add_executable(webserverex examples/webserverex.cpp) target_link_libraries(webserverex PUBLIC tessesframework) @@ -144,7 +142,15 @@ if(TESSESFRAMEWORK_ENABLE_EXAMPLES) add_executable(mountabletest examples/mountabletest.cpp) target_link_libraries(mountabletest PUBLIC tessesframework) - add_executable(tfetch examples/tfetch.cpp) - target_link_libraries(tfetch PUBLIC tessesframework) - install(TARGETS tfetch DESTINATION bin) + +endif() + +if(TESSESFRAMEWORK_ENABLE_APPS) +add_executable(tfetch apps/tfetch.cpp) +target_link_libraries(tfetch PUBLIC tessesframework) +install(TARGETS tfetch DESTINATION bin) +add_executable(tfileserver apps/tfileserver.cpp) +target_link_libraries(tfileserver PUBLIC tessesframework) +install(TARGETS tfileserver DESTINATION bin) + endif() \ No newline at end of file diff --git a/examples/tfetch.cpp b/apps/tfetch.cpp similarity index 100% rename from examples/tfetch.cpp rename to apps/tfetch.cpp diff --git a/examples/fileserver.cpp b/apps/tfileserver.cpp similarity index 100% rename from examples/fileserver.cpp rename to apps/tfileserver.cpp