if(INCLUDE__CMSIS_5)

    get_filename_component(_tmp_lib_src_dir "${CMSIS_5__BASE_DIR}" ABSOLUTE)

    include_directories(${_tmp_lib_src_dir})
    include_directories(${_tmp_lib_src_dir}/CMSIS/DSP/Include)
    include_directories(${_tmp_lib_src_dir}/CMSIS/NN/Include)

    add_definitions("-DCMSIS_NN")

    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/ActivationFunctions/arm_nn_activations_q7.c)
    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/ActivationFunctions/arm_nn_activations_q15.c)
    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/ActivationFunctions/arm_relu_q7.c)
    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/ActivationFunctions/arm_relu_q15.c)
    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/ActivationFunctions/arm_relu6_s8.c)

    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/BasicMathFunctions/arm_elementwise_add_s8.c)
    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/BasicMathFunctions/arm_elementwise_mul_s8.c)

    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/ConcatenationFunctions/arm_concatenation_s8_w.c)
    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/ConcatenationFunctions/arm_concatenation_s8_x.c)
    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/ConcatenationFunctions/arm_concatenation_s8_y.c)
    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/ConcatenationFunctions/arm_concatenation_s8_z.c)

    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/ConvolutionFunctions/arm_convolve_1_x_n_s8.c)
    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/ConvolutionFunctions/arm_convolve_1x1_HWC_q7_fast_nonsquare.c)
    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/ConvolutionFunctions/arm_convolve_1x1_s8_fast.c)
    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/ConvolutionFunctions/arm_convolve_HWC_q7_basic_nonsquare.c)
    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/ConvolutionFunctions/arm_convolve_HWC_q7_basic.c)
    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/ConvolutionFunctions/arm_convolve_HWC_q7_fast_nonsquare.c)
    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/ConvolutionFunctions/arm_convolve_HWC_q7_fast.c)
    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/ConvolutionFunctions/arm_convolve_HWC_q7_RGB.c)
    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/ConvolutionFunctions/arm_convolve_HWC_q15_basic.c)
    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/ConvolutionFunctions/arm_convolve_HWC_q15_fast_nonsquare.c)
    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/ConvolutionFunctions/arm_convolve_HWC_q15_fast.c)
    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/ConvolutionFunctions/arm_convolve_s8.c)
    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/ConvolutionFunctions/arm_convolve_wrapper_s8.c)
    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/ConvolutionFunctions/arm_depthwise_conv_3x3_s8.c)
    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/ConvolutionFunctions/arm_depthwise_conv_s8_opt.c)
    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/ConvolutionFunctions/arm_depthwise_conv_s8.c)
    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/ConvolutionFunctions/arm_depthwise_conv_u8_basic_ver1.c)
    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/ConvolutionFunctions/arm_depthwise_conv_wrapper_s8.c)
    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/ConvolutionFunctions/arm_depthwise_separable_conv_HWC_q7_nonsquare.c)
    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/ConvolutionFunctions/arm_depthwise_separable_conv_HWC_q7.c)
    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/ConvolutionFunctions/arm_nn_depthwise_conv_s8_core.c)
    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/ConvolutionFunctions/arm_nn_mat_mult_kernel_q7_q15_reordered.c)
    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/ConvolutionFunctions/arm_nn_mat_mult_kernel_q7_q15.c)
    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/ConvolutionFunctions/arm_nn_mat_mult_kernel_s8_s16_reordered.c)
    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/ConvolutionFunctions/arm_nn_mat_mult_kernel_s8_s16.c)
    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/ConvolutionFunctions/arm_nn_mat_mult_s8.c)

    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/FullyConnectedFunctions/arm_fully_connected_mat_q7_vec_q15_opt.c)
    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/FullyConnectedFunctions/arm_fully_connected_mat_q7_vec_q15.c)
    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/FullyConnectedFunctions/arm_fully_connected_q7_opt.c)
    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/FullyConnectedFunctions/arm_fully_connected_q7.c)
    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/FullyConnectedFunctions/arm_fully_connected_q15_opt.c)
    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/FullyConnectedFunctions/arm_fully_connected_q15.c)
    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/FullyConnectedFunctions/arm_fully_connected_s8.c)

    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/NNSupportFunctions/arm_nn_accumulate_q7_to_q15.c)
    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/NNSupportFunctions/arm_nn_add_q7.c)
    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/NNSupportFunctions/arm_nn_depthwise_conv_nt_t_padded_s8.c)
    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/NNSupportFunctions/arm_nn_depthwise_conv_nt_t_s8.c)
    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/NNSupportFunctions/arm_nn_mat_mul_core_1x_s8.c)
    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/NNSupportFunctions/arm_nn_mat_mul_core_4x_s8.c)
    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/NNSupportFunctions/arm_nn_mat_mult_nt_t_s8.c)
    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/NNSupportFunctions/arm_nn_mult_q7.c)
    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/NNSupportFunctions/arm_nn_mult_q15.c)
    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/NNSupportFunctions/arm_nn_vec_mat_mult_t_s8.c)
    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/NNSupportFunctions/arm_nn_vec_mat_mult_t_svdf_s8.c)
    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/NNSupportFunctions/arm_nntables.c)
    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/NNSupportFunctions/arm_q7_to_q15_no_shift.c)
    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/NNSupportFunctions/arm_q7_to_q15_reordered_no_shift.c)
    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/NNSupportFunctions/arm_q7_to_q15_reordered_with_offset.c)
    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/NNSupportFunctions/arm_q7_to_q15_with_offset.c)

    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/PoolingFunctions/arm_avgpool_s8.c)
    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/PoolingFunctions/arm_max_pool_s8.c)
    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/PoolingFunctions/arm_pool_q7_HWC.c)

    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/ReshapeFunctions/arm_reshape_s8.c)

    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/SoftmaxFunctions/arm_softmax_q7.c)
    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/SoftmaxFunctions/arm_softmax_q15.c)
    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/SoftmaxFunctions/arm_softmax_s8.c)
    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/SoftmaxFunctions/arm_softmax_u8.c)
    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/SoftmaxFunctions/arm_softmax_with_batch_q7.c)

    set(PROJECT_SOURCES ${PROJECT_SOURCES} ${_tmp_lib_src_dir}/CMSIS/NN/Source/SVDFunctions/arm_svdf_s8.c)

endif(INCLUDE__CMSIS_5)

