From 0b800b4290f2f58d77f6639b2942f9f0c59efe58 Mon Sep 17 00:00:00 2001 From: Alice Date: Fri, 13 Feb 2026 18:09:57 +0100 Subject: [PATCH] added fetch fmt server library --- CMakeLists.txt | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8830eb86e..1a8326d78 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -165,6 +165,30 @@ else() endif() +if (SLS_FETCH_FMT_FROM_GITHUB) + set(FMT_TEST OFF CACHE INTERNAL "disabling fmt tests") + FetchContent_Declare( + fmt + GIT_REPOSITORY https://github.com/fmtlib/fmt.git + GIT_TAG 10.2.1 + GIT_PROGRESS TRUE + USES_TERMINAL_DOWNLOAD TRUE + ) + set(FMT_INSTALL ON CACHE BOOL "") + # set(FMT_CMAKE_DIR "") + FetchContent_MakeAvailable(fmt) + set_property(TARGET fmt PROPERTY POSITION_INDEPENDENT_CODE ON) + install(TARGETS fmt + EXPORT ${project}-targets + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + ) +else() + find_package(fmt 6 REQUIRED) +endif() + include(GNUInstallDirs) # If conda build, always set lib dir to 'lib' @@ -424,6 +448,11 @@ if (SLS_USE_SERVER) add_subdirectory(slsDetectorServers/slsDetectorServer_cpp) endif() +# TODO refactor with simulators +if (SLS_USE_SERVER) + add_subdirectory(slsDetectorServers/slsDetectorServer) +endif() + if (SLS_USE_RECEIVER) add_subdirectory(slsReceiverSoftware) endif (SLS_USE_RECEIVER)