yet another try

This commit is contained in:
Markus Rosenstihl 2019-05-29 10:03:37 +02:00
parent 14f1cc90dd
commit d6823c5533

View File

@ -21,7 +21,6 @@ add_custom_command(OUTPUT ${SPC_HEADERS}
# If the "linux" folder exists the driver will be build.
# Alternatively you can set the SPC_SOURCE environment variable to the micx_drv folder
message("\nIf you have signed the NDA from Spectrum and got a kernel driver tarball (i.e. drvsrc_all_V*.tgz), put it in:\n\n\t" ${CMAKE_CURRENT_SOURCE_DIR} "\n\nto get a kernel module built\n")
file(GLOB MILIST "drvsrc_all_V*.tgz" )
# sort and select last (alphabetic order) tarball driver
list(SORT MILIST)
@ -48,10 +47,10 @@ elseif(DEFINED ENV{SPC_SOURCE})
set(SPC_SRC $ENV{SPC_SOURCE})
else()
set(SPC_SRC "${CMAKE_CURRENT_SOURCE_DIR}/linux/src_all/micx_drv")
message("\nIf you have signed the NDA from Spectrum and got a kernel driver tarball (i.e. drvsrc_all_V*.tgz), put it in:\n\n\t" ${CMAKE_CURRENT_SOURCE_DIR} "\n\nto get a kernel module built\n")
message(WARNING "Spectrum driver source path not defined in envirnoment variable SPC_SOURCE,\nusing default: " ${SPC_SRC})
endif()
set(DRIVER_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
file(GLOB KERNEL_VERSIONS_DIR RELATIVE "/lib/modules" "/lib/modules/*/build")
foreach(KERNEL_DIR ${KERNEL_VERSIONS_DIR})