mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
CMake: Allow a broader range of source file extensions in modules
This commit is contained in:
parent
52fcd4b336
commit
8023985a8a
1 changed files with 6 additions and 3 deletions
|
|
@ -326,18 +326,21 @@ function(_juce_module_sources module_path output_path built_sources other_source
|
||||||
set(base_path "${module_glob}/${module_glob}")
|
set(base_path "${module_glob}/${module_glob}")
|
||||||
|
|
||||||
set(module_cpp ${all_module_files})
|
set(module_cpp ${all_module_files})
|
||||||
list(FILTER module_cpp INCLUDE REGEX "^${base_path}[^/]*\\.cpp$")
|
list(FILTER module_cpp INCLUDE REGEX "^${base_path}[^/]*\\.(c|cc|cpp|cxx|s|asm)$")
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
set(module_mm ${all_module_files})
|
set(module_mm ${all_module_files})
|
||||||
list(FILTER module_mm INCLUDE REGEX "^${base_path}[^/]*\\.(mm|r)$")
|
list(FILTER module_mm INCLUDE REGEX "^${base_path}[^/]*\\.mm$")
|
||||||
|
|
||||||
if(module_mm)
|
if(module_mm)
|
||||||
set(module_mm_replaced ${module_mm})
|
set(module_mm_replaced ${module_mm})
|
||||||
list(TRANSFORM module_mm_replaced REPLACE "\\.mm$" ".cpp")
|
list(TRANSFORM module_mm_replaced REPLACE "\\.mm$" ".cpp")
|
||||||
list(REMOVE_ITEM module_cpp ${module_mm_replaced})
|
list(REMOVE_ITEM module_cpp ${module_mm_replaced})
|
||||||
list(APPEND module_cpp ${module_mm})
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
set(module_apple_files ${all_module_files})
|
||||||
|
list(FILTER module_apple_files INCLUDE REGEX "${base_path}[^/]*\\.(m|mm|metal|r|swift)$")
|
||||||
|
list(APPEND module_cpp ${module_apple_files})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(headers ${all_module_files})
|
set(headers ${all_module_files})
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue