CMakeLists.txt 6.2 KB

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