CMakeLists.txt 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. cmake_minimum_required (VERSION 3.6)
  2. project(CMSISDSPTransform)
  3. add_library(CMSISDSPTransform STATIC)
  4. include(fft)
  5. fft(CMSISDSPTransform)
  6. if (CONFIGTABLE AND ALLFFT)
  7. target_compile_definitions(CMSISDSPTransform PUBLIC ARM_ALL_FFT_TABLES)
  8. endif()
  9. target_sources(CMSISDSPTransform PRIVATE arm_bitreversal.c)
  10. target_sources(CMSISDSPTransform PRIVATE arm_bitreversal2.c)
  11. if (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
  12. OR CFFT_F32_1024 OR CFFT_F32_2048 OR CFFT_F32_4096)
  13. target_sources(CMSISDSPTransform PRIVATE arm_cfft_radix2_f32.c)
  14. target_sources(CMSISDSPTransform PRIVATE arm_cfft_radix4_f32.c)
  15. target_sources(CMSISDSPTransform PRIVATE arm_cfft_radix8_f32.c)
  16. target_sources(CMSISDSPTransform PRIVATE arm_cfft_f32.c)
  17. endif()
  18. if (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
  19. OR CFFT_Q15_1024 OR CFFT_Q15_2048 OR CFFT_Q15_4096)
  20. target_sources(CMSISDSPTransform PRIVATE arm_cfft_radix2_q15.c)
  21. target_sources(CMSISDSPTransform PRIVATE arm_cfft_radix4_q15.c)
  22. target_sources(CMSISDSPTransform PRIVATE arm_cfft_q15.c)
  23. endif()
  24. if (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
  25. OR CFFT_Q31_1024 OR CFFT_Q31_2048 OR CFFT_Q31_4096)
  26. target_sources(CMSISDSPTransform PRIVATE arm_cfft_radix2_q31.c)
  27. target_sources(CMSISDSPTransform PRIVATE arm_cfft_radix4_q31.c)
  28. target_sources(CMSISDSPTransform PRIVATE arm_cfft_q31.c)
  29. endif()
  30. if (NOT CONFIGTABLE OR ALLFFT)
  31. target_sources(CMSISDSPTransform PRIVATE arm_cfft_radix2_init_q15.c)
  32. target_sources(CMSISDSPTransform PRIVATE arm_cfft_radix2_init_q31.c)
  33. endif()
  34. if (NOT CONFIGTABLE OR ALLFFT OR DCT4_F32_128 OR DCT4_F32_512 OR DCT4_F32_2048 OR DCT4_F32_8192)
  35. target_sources(CMSISDSPTransform PRIVATE arm_dct4_f32.c)
  36. target_sources(CMSISDSPTransform PRIVATE arm_dct4_init_f32.c)
  37. target_sources(CMSISDSPTransform PRIVATE arm_rfft_init_f32.c)
  38. target_sources(CMSISDSPTransform PRIVATE arm_rfft_f32.c)
  39. target_sources(CMSISDSPTransform PRIVATE arm_cfft_radix4_init_f32.c)
  40. target_sources(CMSISDSPTransform PRIVATE arm_cfft_radix4_f32.c)
  41. endif()
  42. if (NOT CONFIGTABLE OR ALLFFT OR DCT4_Q31_128 OR DCT4_Q31_512 OR DCT4_Q31_2048 OR DCT4_Q31_8192)
  43. target_sources(CMSISDSPTransform PRIVATE arm_dct4_q31.c)
  44. target_sources(CMSISDSPTransform PRIVATE arm_dct4_init_q31.c)
  45. target_sources(CMSISDSPTransform PRIVATE arm_rfft_init_q31.c)
  46. target_sources(CMSISDSPTransform PRIVATE arm_rfft_q31.c)
  47. target_sources(CMSISDSPTransform PRIVATE arm_cfft_q31.c)
  48. target_sources(CMSISDSPTransform PRIVATE arm_cfft_radix4_init_q31.c)
  49. target_sources(CMSISDSPTransform PRIVATE arm_cfft_radix4_q31.c)
  50. endif()
  51. if (NOT CONFIGTABLE OR ALLFFT OR ALLFFT OR DCT4_Q15_128 OR DCT4_Q15_512 OR DCT4_Q15_2048 OR DCT4_Q15_8192)
  52. target_sources(CMSISDSPTransform PRIVATE arm_dct4_init_q15.c)
  53. target_sources(CMSISDSPTransform PRIVATE arm_dct4_q15.c)
  54. target_sources(CMSISDSPTransform PRIVATE arm_rfft_init_q15.c)
  55. target_sources(CMSISDSPTransform PRIVATE arm_rfft_q15.c)
  56. target_sources(CMSISDSPTransform PRIVATE arm_cfft_q15.c)
  57. target_sources(CMSISDSPTransform PRIVATE arm_cfft_radix4_init_q15.c)
  58. target_sources(CMSISDSPTransform PRIVATE arm_cfft_radix4_q15.c)
  59. endif()
  60. if (NOT CONFIGTABLE OR ALLFFT OR RFFT_FAST_F32_32 OR RFFT_FAST_F32_64 OR RFFT_FAST_F32_128
  61. OR RFFT_FAST_F32_256 OR RFFT_FAST_F32_512 OR RFFT_FAST_F32_1024 OR RFFT_FAST_F32_2048
  62. OR RFFT_FAST_F32_4096 )
  63. target_sources(CMSISDSPTransform PRIVATE arm_rfft_fast_f32.c)
  64. target_sources(CMSISDSPTransform PRIVATE arm_rfft_fast_init_f32.c)
  65. target_sources(CMSISDSPTransform PRIVATE arm_cfft_f32.c)
  66. target_sources(CMSISDSPTransform PRIVATE arm_cfft_radix8_f32.c)
  67. endif()
  68. if (NOT CONFIGTABLE OR ALLFFT OR RFFT_F32_128 OR RFFT_F32_512 OR RFFT_F32_2048 OR RFFT_F32_8192)
  69. target_sources(CMSISDSPTransform PRIVATE arm_rfft_init_f32.c)
  70. target_sources(CMSISDSPTransform PRIVATE arm_rfft_f32.c)
  71. target_sources(CMSISDSPTransform PRIVATE arm_cfft_radix4_init_f32.c)
  72. target_sources(CMSISDSPTransform PRIVATE arm_cfft_radix4_f32.c)
  73. endif()
  74. if (NOT CONFIGTABLE OR ALLFFT OR RFFT_Q15_32 OR RFFT_Q15_64 OR RFFT_Q15_128 OR RFFT_Q15_256
  75. OR RFFT_Q15_512 OR RFFT_Q15_1024 OR RFFT_Q15_2048 OR RFFT_Q15_4096 OR RFFT_Q15_8192)
  76. target_sources(CMSISDSPTransform PRIVATE arm_rfft_init_q15.c)
  77. target_sources(CMSISDSPTransform PRIVATE arm_rfft_q15.c)
  78. target_sources(CMSISDSPTransform PRIVATE arm_cfft_q15.c)
  79. target_sources(CMSISDSPTransform PRIVATE arm_cfft_radix4_q15.c)
  80. endif()
  81. if (NOT CONFIGTABLE OR ALLFFT OR RFFT_Q31_32 OR RFFT_Q31_64 OR RFFT_Q31_128 OR RFFT_Q31_256
  82. OR RFFT_Q31_512 OR RFFT_Q31_1024 OR RFFT_Q31_2048 OR RFFT_Q31_4096 OR RFFT_Q31_8192)
  83. target_sources(CMSISDSPTransform PRIVATE arm_rfft_init_q31.c)
  84. target_sources(CMSISDSPTransform PRIVATE arm_rfft_q31.c)
  85. target_sources(CMSISDSPTransform PRIVATE arm_cfft_q31.c)
  86. target_sources(CMSISDSPTransform PRIVATE arm_cfft_radix4_q31.c)
  87. endif()
  88. configdsp(CMSISDSPTransform ..)
  89. ### Includes
  90. target_include_directories(CMSISDSPTransform PUBLIC "${DSP}/../../Include")