added fetch fmt server library

This commit is contained in:
2026-05-29 15:02:38 +02:00
parent 4c02ce65cc
commit 0b800b4290
+29
View File
@@ -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)