David Beck | 10b4dfd | 2018-09-19 12:03:20 +0100 | [diff] [blame] | 1 | # |
| 2 | # Copyright © 2017 Arm Ltd. All rights reserved. |
| 3 | # SPDX-License-Identifier: MIT |
| 4 | # |
| 5 | |
David Beck | 10b4dfd | 2018-09-19 12:03:20 +0100 | [diff] [blame] | 6 | # single place to use wildcards, so we can include |
David Beck | 711fa31 | 2018-09-24 10:46:38 +0100 | [diff] [blame] | 7 | # yet unknown backend modules and corresponding common libraries |
| 8 | FILE(GLOB commonIncludes ${PROJECT_SOURCE_DIR}/src/backends/*/common.cmake) |
David Beck | 10b4dfd | 2018-09-19 12:03:20 +0100 | [diff] [blame] | 9 | FILE(GLOB backendIncludes ${PROJECT_SOURCE_DIR}/src/backends/*/backend.cmake) |
| 10 | |
David Beck | 3cc9a62 | 2018-10-12 10:38:31 +0100 | [diff] [blame] | 11 | # prefer to include common code first |
| 12 | foreach(includeFile ${commonIncludes}) |
| 13 | message("Including backend common library into the build: ${includeFile}") |
| 14 | include(${includeFile}) |
| 15 | endforeach() |
| 16 | |
| 17 | # now backends can depend on common code included first |
| 18 | foreach(includeFile ${backendIncludes}) |
David Beck | 0dbe0ee | 2018-09-24 15:59:27 +0100 | [diff] [blame] | 19 | message("Including backend into the build: ${includeFile}") |
| 20 | include(${includeFile}) |
David Beck | 10b4dfd | 2018-09-19 12:03:20 +0100 | [diff] [blame] | 21 | endforeach() |