1cmake_minimum_required (VERSION 3.6) 2 3project(CMSISDSPTransform) 4 5include(configLib) 6include(configDsp) 7 8add_library(CMSISDSPTransform STATIC) 9configLib(CMSISDSPTransform ${ROOT}) 10configDsp(CMSISDSPTransform ${ROOT}) 11 12include(fft) 13fft(CMSISDSPTransform) 14 15if (CONFIGTABLE AND ALLFFT) 16target_compile_definitions(CMSISDSPTransform PUBLIC ARM_ALL_FFT_TABLES) 17endif() 18 19target_sources(CMSISDSPTransform PRIVATE arm_bitreversal.c) 20target_sources(CMSISDSPTransform PRIVATE arm_bitreversal2.c) 21 22if (NOT CONFIGTABLE OR ALLFFT OR CFFT_F32_16 OR CFFT_F32_32 OR CFFT_F32_64 OR CFFT_F32_128 OR CFFT_F32_256 OR CFFT_F32_512 23 OR CFFT_F32_1024 OR CFFT_F32_2048 OR CFFT_F32_4096) 24target_sources(CMSISDSPTransform PRIVATE arm_cfft_radix2_f32.c) 25target_sources(CMSISDSPTransform PRIVATE arm_cfft_radix4_f32.c) 26target_sources(CMSISDSPTransform PRIVATE arm_cfft_radix8_f32.c) 27target_sources(CMSISDSPTransform PRIVATE arm_cfft_f32.c) 28target_sources(CMSISDSPTransform PRIVATE arm_cfft_init_f32.c) 29endif() 30 31if (NOT CONFIGTABLE OR ALLFFT OR CFFT_F64_16 OR CFFT_F64_32 OR CFFT_F64_64 OR CFFT_F64_128 OR CFFT_F64_256 OR CFFT_F64_512 32 OR CFFT_F64_1024 OR CFFT_F64_2048 OR CFFT_F64_4096) 33target_sources(CMSISDSPTransform PRIVATE arm_cfft_f64.c) 34endif() 35 36if (NOT CONFIGTABLE OR ALLFFT OR CFFT_Q15_16 OR CFFT_Q15_32 OR CFFT_Q15_64 OR CFFT_Q15_128 OR CFFT_Q15_256 OR CFFT_Q15_512 37 OR CFFT_Q15_1024 OR CFFT_Q15_2048 OR CFFT_Q15_4096) 38target_sources(CMSISDSPTransform PRIVATE arm_cfft_radix2_q15.c) 39target_sources(CMSISDSPTransform PRIVATE arm_cfft_radix4_q15.c) 40target_sources(CMSISDSPTransform PRIVATE arm_cfft_q15.c) 41target_sources(CMSISDSPTransform PRIVATE arm_cfft_init_q15.c) 42endif() 43 44if (NOT CONFIGTABLE OR ALLFFT OR CFFT_Q31_16 OR CFFT_Q31_32 OR CFFT_Q31_64 OR CFFT_Q31_128 OR CFFT_Q31_256 OR CFFT_Q31_512 45 OR CFFT_Q31_1024 OR CFFT_Q31_2048 OR CFFT_Q31_4096) 46target_sources(CMSISDSPTransform PRIVATE arm_cfft_radix2_q31.c) 47target_sources(CMSISDSPTransform PRIVATE arm_cfft_radix4_q31.c) 48target_sources(CMSISDSPTransform PRIVATE arm_cfft_q31.c) 49target_sources(CMSISDSPTransform PRIVATE arm_cfft_init_q31.c) 50endif() 51 52if (NOT CONFIGTABLE OR ALLFFT) 53target_sources(CMSISDSPTransform PRIVATE arm_cfft_radix2_init_q15.c) 54target_sources(CMSISDSPTransform PRIVATE arm_cfft_radix2_init_q31.c) 55endif() 56 57if (NOT CONFIGTABLE OR ALLFFT OR DCT4_F32_128 OR DCT4_F32_512 OR DCT4_F32_2048 OR DCT4_F32_8192) 58target_sources(CMSISDSPTransform PRIVATE arm_dct4_f32.c) 59target_sources(CMSISDSPTransform PRIVATE arm_dct4_init_f32.c) 60 61target_sources(CMSISDSPTransform PRIVATE arm_rfft_init_f32.c) 62target_sources(CMSISDSPTransform PRIVATE arm_rfft_f32.c) 63target_sources(CMSISDSPTransform PRIVATE arm_cfft_radix4_init_f32.c) 64target_sources(CMSISDSPTransform PRIVATE arm_cfft_radix4_f32.c) 65endif() 66 67if (NOT CONFIGTABLE OR ALLFFT OR DCT4_Q31_128 OR DCT4_Q31_512 OR DCT4_Q31_2048 OR DCT4_Q31_8192) 68target_sources(CMSISDSPTransform PRIVATE arm_dct4_q31.c) 69target_sources(CMSISDSPTransform PRIVATE arm_dct4_init_q31.c) 70 71target_sources(CMSISDSPTransform PRIVATE arm_rfft_init_q31.c) 72target_sources(CMSISDSPTransform PRIVATE arm_rfft_q31.c) 73target_sources(CMSISDSPTransform PRIVATE arm_cfft_q31.c) 74target_sources(CMSISDSPTransform PRIVATE arm_cfft_init_q31.c) 75target_sources(CMSISDSPTransform PRIVATE arm_cfft_radix4_init_q31.c) 76target_sources(CMSISDSPTransform PRIVATE arm_cfft_radix4_q31.c) 77endif() 78 79if (NOT CONFIGTABLE OR ALLFFT OR ALLFFT OR DCT4_Q15_128 OR DCT4_Q15_512 OR DCT4_Q15_2048 OR DCT4_Q15_8192) 80target_sources(CMSISDSPTransform PRIVATE arm_dct4_init_q15.c) 81target_sources(CMSISDSPTransform PRIVATE arm_dct4_q15.c) 82 83target_sources(CMSISDSPTransform PRIVATE arm_rfft_init_q15.c) 84target_sources(CMSISDSPTransform PRIVATE arm_rfft_q15.c) 85target_sources(CMSISDSPTransform PRIVATE arm_cfft_q15.c) 86target_sources(CMSISDSPTransform PRIVATE arm_cfft_init_q15.c) 87target_sources(CMSISDSPTransform PRIVATE arm_cfft_radix4_init_q15.c) 88target_sources(CMSISDSPTransform PRIVATE arm_cfft_radix4_q15.c) 89endif() 90 91if (NOT CONFIGTABLE OR ALLFFT OR RFFT_FAST_F32_32 OR RFFT_FAST_F32_64 OR RFFT_FAST_F32_128 92 OR RFFT_FAST_F32_256 OR RFFT_FAST_F32_512 OR RFFT_FAST_F32_1024 OR RFFT_FAST_F32_2048 93 OR RFFT_FAST_F32_4096 ) 94target_sources(CMSISDSPTransform PRIVATE arm_rfft_fast_f32.c) 95target_sources(CMSISDSPTransform PRIVATE arm_rfft_fast_init_f32.c) 96target_sources(CMSISDSPTransform PRIVATE arm_cfft_f32.c) 97target_sources(CMSISDSPTransform PRIVATE arm_cfft_init_f32.c) 98target_sources(CMSISDSPTransform PRIVATE arm_cfft_radix8_f32.c) 99endif() 100 101if (NOT CONFIGTABLE OR ALLFFT OR RFFT_FAST_F64_32 OR RFFT_FAST_F64_64 OR RFFT_FAST_F64_128 102 OR RFFT_FAST_F64_256 OR RFFT_FAST_F64_512 OR RFFT_FAST_F64_1024 OR RFFT_FAST_F64_2048 103 OR RFFT_FAST_F64_4096 ) 104target_sources(CMSISDSPTransform PRIVATE arm_rfft_fast_f64.c) 105target_sources(CMSISDSPTransform PRIVATE arm_rfft_fast_init_f64.c) 106endif() 107 108 109 110if (NOT CONFIGTABLE OR ALLFFT OR RFFT_F32_128 OR RFFT_F32_512 OR RFFT_F32_2048 OR RFFT_F32_8192) 111target_sources(CMSISDSPTransform PRIVATE arm_rfft_init_f32.c) 112target_sources(CMSISDSPTransform PRIVATE arm_rfft_f32.c) 113target_sources(CMSISDSPTransform PRIVATE arm_cfft_radix4_init_f32.c) 114target_sources(CMSISDSPTransform PRIVATE arm_cfft_radix4_f32.c) 115endif() 116 117if (NOT CONFIGTABLE OR ALLFFT OR RFFT_Q15_32 OR RFFT_Q15_64 OR RFFT_Q15_128 OR RFFT_Q15_256 118 OR RFFT_Q15_512 OR RFFT_Q15_1024 OR RFFT_Q15_2048 OR RFFT_Q15_4096 OR RFFT_Q15_8192) 119target_sources(CMSISDSPTransform PRIVATE arm_rfft_init_q15.c) 120target_sources(CMSISDSPTransform PRIVATE arm_rfft_q15.c) 121target_sources(CMSISDSPTransform PRIVATE arm_cfft_q15.c) 122target_sources(CMSISDSPTransform PRIVATE arm_cfft_init_q15.c) 123target_sources(CMSISDSPTransform PRIVATE arm_cfft_radix4_q15.c) 124endif() 125 126if (NOT CONFIGTABLE OR ALLFFT OR RFFT_Q31_32 OR RFFT_Q31_64 OR RFFT_Q31_128 OR RFFT_Q31_256 127 OR RFFT_Q31_512 OR RFFT_Q31_1024 OR RFFT_Q31_2048 OR RFFT_Q31_4096 OR RFFT_Q31_8192) 128target_sources(CMSISDSPTransform PRIVATE arm_rfft_init_q31.c) 129target_sources(CMSISDSPTransform PRIVATE arm_rfft_q31.c) 130target_sources(CMSISDSPTransform PRIVATE arm_cfft_q31.c) 131target_sources(CMSISDSPTransform PRIVATE arm_cfft_init_q31.c) 132target_sources(CMSISDSPTransform PRIVATE arm_cfft_radix4_q31.c) 133endif() 134 135# For scipy or wrappers or benchmarks 136if (WRAPPER) 137target_sources(CMSISDSPTransform PRIVATE arm_cfft_radix2_init_f32.c) 138endif() 139 140### Includes 141target_include_directories(CMSISDSPTransform PUBLIC "${DSP}/Include") 142 143 144 145