If libspcm is not found skip compiling drivers dependent on it.

This commit is contained in:
Markus Rosenstihl 2018-03-19 21:04:33 +01:00
parent e48c1e86cf
commit 59571b566d

View File

@ -56,14 +56,19 @@ add_executable(fc1neu_backend fc1neu_backend.cpp hardware.cpp)
target_link_libraries( fc1neu_backend pthread ${XERCES_LIBRARIES} core Spectrum_MI40xxSeries ${PB24} PTS DAC20 )
# spcm linux driver needs to be installed (see http://spectrum-instrumentation.com/de/downloads/drivers)
include_directories(${CMAKE_SOURCE_DIR}/drivers/Spectrum-M2i40xxSeries/include)
add_executable(fc1_vierkanal_backend fc1_vierkanal_backend.cpp hardware.cpp)
target_link_libraries( fc1_vierkanal_backend pthread ${XERCES_LIBRARIES} core spcm_linux Spectrum-M2i40xxSeries ${PB24} PTS DAC20 )
find_library(SPCM_LIB spcm)
if (NOT SPCM_LIB)
message(WARNING "spcm not found, install library (see http://spectrum-instrumentation.com/de/downloads/drivers)")
else()
include_directories(${CMAKE_SOURCE_DIR}/drivers/Spectrum-M2i40xxSeries/include)
add_executable(fc1_vierkanal_backend fc1_vierkanal_backend.cpp hardware.cpp)
target_link_libraries( fc1_vierkanal_backend pthread ${XERCES_LIBRARIES} core spcm_linux Spectrum-M2i40xxSeries ${PB24} PTS DAC20 )
include_directories(${CMAKE_SOURCE_DIR}/drivers/Spectrum-M2i40xxSeries/include)
add_executable(fc1_backend fc1_backend.cpp hardware.cpp)
target_link_libraries( fc1_backend pthread ${XERCES_LIBRARIES} core spcm_linux Spectrum-M2i40xxSeries ${PB24} PTS DAC20 )
endif()
# spcm linux driver needs to be installed (see http://spectrum-instrumentation.com/de/downloads/drivers)
include_directories(${CMAKE_SOURCE_DIR}/drivers/Spectrum-M2i40xxSeries/include)
add_executable(fc1_backend fc1_backend.cpp hardware.cpp)
target_link_libraries( fc1_backend pthread ${XERCES_LIBRARIES} core spcm_linux Spectrum-M2i40xxSeries ${PB24} PTS DAC20 )
add_executable(fc2_backend fc2_backend.cpp hardware.cpp)
target_link_libraries( fc2_backend pthread ${XERCES_LIBRARIES} core Spectrum_MI40xxSeries ${PB24} PTS DAC20 )