only include SPI for real MH server

This commit is contained in:
Erik Fröjdh committed 2026-10-26 20:22:39 +01:00
1 parent 5ee7844b35
commit d438b37b64
1 file changed
+8 -2
@@ -2,10 +2,16 @@
set(MATTERHORN_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/src/MatterhornApp.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/communication/SPICommunication.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/utils/HelperFunctions.cpp
)
# Hardware SPI communication (linux/spi/spidev.h) is Linux only and is
# only needed by the real server. The virtual server uses
# VirtualSPICommunication, which is header only.
set(MATTERHORN_HARDWARE_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/src/communication/SPICommunication.cpp
)
set(MATTERHORN_INCLUDE_DIRS
${CMAKE_CURRENT_SOURCE_DIR}/src
${CMAKE_CURRENT_SOURCE_DIR}/src/communication
@@ -56,7 +62,7 @@ if(SLS_USE_MATTERHORN)
VERBATIM)
endif()
add_executable(matterhornDetectorServer ${MATTERHORN_SOURCES})
add_executable(matterhornDetectorServer ${MATTERHORN_SOURCES} ${MATTERHORN_HARDWARE_SOURCES})
if(CMAKE_CROSSCOMPILING) # only update version if cross compiling binaries
add_dependencies(matterhornDetectorServer update_server_version)