fixed cmake hopefully

This commit is contained in:
Markus Rosenstihl 2019-06-04 17:08:47 +02:00
parent 11c4966cb0
commit 556b3ff38b

View File

@ -43,10 +43,11 @@ if(EXISTS ${MITGZ})
COMMENT "Unpacking Spectrum driver tarball" COMMENT "Unpacking Spectrum driver tarball"
VERBATIM) VERBATIM)
set(SPC_SRC "${CMAKE_CURRENT_SOURCE_DIR}/linux/src_all/micx_drv") set(SPC_SRC "${CMAKE_CURRENT_SOURCE_DIR}/linux/src_all/micx_drv")
add_custom_target(spc_smp ALL DEPENDS linux/src_all/micx_drv) add_custom_target(spc_smp ALL DEPENDS ${SPC_SRC})
elseif(DEFINED ENV{SPC_SOURCE}) elseif(DEFINED ENV{SPC_SOURCE})
message(STATUS "SPC_SOURCE environment variable set: " $ENV{SPC_SOURCE}) message(STATUS "SPC_SOURCE environment variable set: " $ENV{SPC_SOURCE})
set(SPC_SRC $ENV{SPC_SOURCE}) set(SPC_SRC $ENV{SPC_SOURCE})
add_custom_target(spc_smp ALL DEPENDS ${SPC_SRC})
else() else()
set(SPC_SRC "${CMAKE_CURRENT_SOURCE_DIR}/linux/src_all/micx_drv") 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("\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")
@ -71,6 +72,7 @@ foreach(KERNEL_DIR ${KERNEL_VERSIONS_DIR})
WORKING_DIRECTORY ${SPC_SRC} WORKING_DIRECTORY ${SPC_SRC}
VERBATIM) VERBATIM)
add_custom_target (micx_drv_${KERNEL_VERSION} ALL DEPENDS ${DRIVER_FILE}) add_custom_target (micx_drv_${KERNEL_VERSION} ALL DEPENDS ${DRIVER_FILE})
add_dependencies (micx_drv_${KERNEL_VERSION} spc_smp)
install(FILES ${DRIVER_FILE} DESTINATION /lib/modules/${KERNEL_VERSION}/kernel/damaris) install(FILES ${DRIVER_FILE} DESTINATION /lib/modules/${KERNEL_VERSION}/kernel/damaris)
endforeach(KERNEL_DIR) endforeach(KERNEL_DIR)
add_library(Spectrum_MI40xxSeries STATIC Spectrum-MI40xxSeries.cpp GatedData.cpp ${SPC_HEADERS}) add_library(Spectrum_MI40xxSeries STATIC Spectrum-MI40xxSeries.cpp GatedData.cpp ${SPC_HEADERS})