fixed cmake build for spc kernel driver

This commit is contained in:
Markus Rosenstihl 2017-02-02 11:30:51 +01:00
parent 72b0d17a33
commit 2dcee09192

View File

@ -22,10 +22,10 @@ add_custom_command(OUTPUT ${SPC_HEADERS}
# If the "linux" folder exists the driver will be build
if(DEFINED ENV{SPC_SOURCE})
message("SPC_SOURCE environment variable set")
message(STATUS "SPC_SOURCE environment variable set" $ENV{SPC_SOURCE})
set(SPC_SRC $ENV{SPC_SOURCE})
else()
message("Spectrum driver source path not defined in envirnoment variable SPC_SOURCE")
message(WARNING "Spectrum driver source path not defined in envirnoment variable SPC_SOURCE")
set(SPC_SRC ${CMAKE_CURRENT_SOURCE_DIR}/linux/src_all/micx_drv)
endif()
set(DRIVER_FILE ${SPC_SRC}/spc_smp.ko )
@ -34,9 +34,6 @@ set(KBUILD_CMD ${CMAKE_MAKE_PROGRAM}
-C ${KERNEL_DIR}
M=${SPC_SRC} modules)
#unset(spc_src CACHE)
#find_file(spc_src )
add_custom_command(OUTPUT ${DRIVER_FILE}
COMMAND ${KBUILD_CMD}
COMMENT "Building spc_smp.ko"
@ -47,7 +44,7 @@ if(EXISTS ${SPC_SRC})
install(FILES ${DRIVER_FILE} DESTINATION /lib/modules/${CMAKE_SYSTEM_VERSION}/kernel/damaris)
else()
message(Spectrum MI40xx dirver not found, unpack and configure it)
message("Spectrum MI40xx kernel driver not found " ${SPC_SRC} " unpack and configure it")
endif()
add_library(Spectrum_MI40xxSeries STATIC Spectrum-MI40xxSeries.cpp GatedData.cpp ${SPC_HEADERS})