Compiling CUDA with Qt, linking issue

I had an error concidering Dynamic linking and cuda using Qt (.pro file), but i have found the solution and here is my solution (only the CUDA section of the .pro file)

DEFINES += PROJECT_PATH=\\"$_PRO_FILE_PWD_\\"
#----------------------------------------------------------------
#-------------------------Cuda setup-----------------------------
#----------------------------------------------------------------

CUDA_SOURCES +=    // source files here

# Path to cuda toolkit install (System specific)
CUDA_DIR = /opt/cuda
INCLUDEPATH += $CUDA_DIR/include
INCLUDEPATH += $CUDA_DIR/samples/common/inc

# Cuda libs dir
QMAKE_LIBDIR += $CUDA_DIR/lib64

## note: for dynamic parallelism you need libcudadevrt
LIBS += -lcudart -lcudadevrt -lcuda

# GPU ARCH
# This gets passed as the gpu-architecture flag to nvcc compiler
# specifying particular architectures enable certain features, limited to the compute capability
# of the GPU. compute capabilities listed here http://en.wikipedia.org/wiki/CUDA
CUDA_ARCH = 21

# Join the includes in a line
CUDA_INC = $join(INCLUDEPATH,' -I','-I',' ') -I$_PRO_FILE_PWD_

# Flags used by the CUDA compiler
NVCCFLAGS = 	--compiler-options -fno-strict-aliasing \
		--ptxas-options=-v \
		-rdc=true \
		-prec-div=true -ftz=false -prec-sqrt=true -fmad=true

# Flags used by both the CUDA compiler and linker
NVCCFLAG_COMMON = -m64 -arch=sm_$CUDA_ARCH
CONFIG(debug, debug|release) {
	#DEBUG
	NVCCFLAG_COMMON += -g -G
} else {
	#RELEASE
	NVCCFLAG_COMMON += -O2
}

#------------------------- Cuda intermediat compiler
# Prepare intermediat cuda compiler
cudaIntr.input = CUDA_SOURCES
#cudaIntr.output = ${OBJECTS_DIR}${QMAKE_FILE_BASE}_cuda.o
cudaIntr.output = ${QMAKE_FILE_BASE}_cuda.o
 
cudaIntr.commands = 	$CUDA_DIR/bin/nvcc $NVCCFLAG_COMMON \
			-dc $NVCCFLAGS $CUDA_INC $LIBS \
			${QMAKE_FILE_NAME} -o ${QMAKE_FILE_OUT}
 
#Set our variable out. These obj files need to be used to create the link obj file and used in our final gcc compilation
cudaIntr.variable_out = CUDA_OBJ
cudaIntr.variable_out += OBJECTS
 
# Tell Qt that we want add more stuff to the Makefile
QMAKE_EXTRA_UNIX_COMPILERS += cudaIntr

#------------------------- Cuda linker (required for dynamic parallelism)
# Prepare the linking compiler step
cuda.input = CUDA_OBJ
cuda.output = link.o
cuda.CONFIG += combine	# Generate 1 output file

# Tweak arch according to your hw's compute capability
cuda.commands = $CUDA_DIR/bin/nvcc $NVCCFLAG_COMMON \
		-dlink *_cuda.o -o link.o
cuda.dependency_type = TYPE_C
cuda.depend_command = 	$CUDA_DIR/bin/nvcc -g -G \
			-M $CUDA_INC $NVCCFLAGS ${QMAKE_FILE_NAME}

# Tell Qt that we want add more stuff to the Makefile
QMAKE_EXTRA_UNIX_COMPILERS += cuda

Edited the post in case some one else has troubles with it. Feel free to remove the topic.