1include_guard(GLOBAL)
2
3
4if (CONFIG_USE_component_osa_zephyr)
5# Add set(CONFIG_USE_component_osa_zephyr true) in config.cmake to use this component
6
7message("component_osa_zephyr component is included from ${CMAKE_CURRENT_LIST_FILE}.")
8
9target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
10  ${CMAKE_CURRENT_LIST_DIR}/./fsl_os_abstraction_zephyr.c
11)
12
13target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
14  ${CMAKE_CURRENT_LIST_DIR}/./.
15)
16
17
18endif()
19
20
21if (CONFIG_USE_component_common_task)
22# Add set(CONFIG_USE_component_common_task true) in config.cmake to use this component
23
24message("component_common_task component is included from ${CMAKE_CURRENT_LIST_FILE}.")
25
26if(CONFIG_USE_driver_common AND CONFIG_USE_component_osa)
27
28target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
29  ${CMAKE_CURRENT_LIST_DIR}/../common_task/fsl_component_common_task.c
30)
31
32target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
33  ${CMAKE_CURRENT_LIST_DIR}/../common_task/.
34)
35
36else()
37
38message(SEND_ERROR "component_common_task dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
39
40endif()
41
42endif()
43
44
45if (CONFIG_USE_component_osa_bm)
46# Add set(CONFIG_USE_component_osa_bm true) in config.cmake to use this component
47
48message("component_osa_bm component is included from ${CMAKE_CURRENT_LIST_FILE}.")
49
50if(CONFIG_USE_driver_common AND CONFIG_USE_component_lists AND CONFIG_USE_component_osa_interface)
51
52target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
53  ${CMAKE_CURRENT_LIST_DIR}/./fsl_os_abstraction_bm.c
54)
55
56target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
57  ${CMAKE_CURRENT_LIST_DIR}/./.
58)
59
60else()
61
62message(SEND_ERROR "component_osa_bm dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
63
64endif()
65
66endif()
67
68
69if (CONFIG_USE_component_osa_free_rtos)
70# Add set(CONFIG_USE_component_osa_free_rtos true) in config.cmake to use this component
71
72message("component_osa_free_rtos component is included from ${CMAKE_CURRENT_LIST_FILE}.")
73
74if(CONFIG_USE_middleware_freertos-kernel AND CONFIG_USE_driver_common AND CONFIG_USE_component_lists AND CONFIG_USE_component_osa_interface)
75
76target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
77  ${CMAKE_CURRENT_LIST_DIR}/./fsl_os_abstraction_free_rtos.c
78)
79
80target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
81  ${CMAKE_CURRENT_LIST_DIR}/./.
82)
83
84else()
85
86message(SEND_ERROR "component_osa_free_rtos dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
87
88endif()
89
90endif()
91
92
93if (CONFIG_USE_component_osa)
94# Add set(CONFIG_USE_component_osa true) in config.cmake to use this component
95
96message("component_osa component is included from ${CMAKE_CURRENT_LIST_FILE}.")
97
98if(CONFIG_USE_driver_common AND CONFIG_USE_component_lists)
99
100if(CONFIG_USE_middleware_baremetal)
101  target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
102      ${CMAKE_CURRENT_LIST_DIR}/./fsl_os_abstraction_bm.c
103  )
104endif()
105
106if(CONFIG_USE_middleware_freertos-kernel)
107  target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
108      ${CMAKE_CURRENT_LIST_DIR}/./fsl_os_abstraction_free_rtos.c
109  )
110endif()
111
112target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
113  ${CMAKE_CURRENT_LIST_DIR}/./.
114)
115
116else()
117
118message(SEND_ERROR "component_osa dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
119
120endif()
121
122endif()
123
124
125if (CONFIG_USE_component_osa_interface)
126# Add set(CONFIG_USE_component_osa_interface true) in config.cmake to use this component
127
128message("component_osa_interface component is included from ${CMAKE_CURRENT_LIST_FILE}.")
129
130if(CONFIG_USE_driver_common AND CONFIG_USE_component_lists)
131
132target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
133  ${CMAKE_CURRENT_LIST_DIR}/./.
134)
135
136else()
137
138message(SEND_ERROR "component_osa_interface dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
139
140endif()
141
142endif()
143
144
145if (CONFIG_USE_component_osa_thread)
146# Add set(CONFIG_USE_component_osa_thread true) in config.cmake to use this component
147
148message("component_osa_thread component is included from ${CMAKE_CURRENT_LIST_FILE}.")
149
150if(CONFIG_USE_driver_common AND CONFIG_USE_component_lists AND CONFIG_USE_component_osa_interface AND (CONFIG_USE_middleware_azure_rtos_tx OR CONFIG_USE_middleware_azure_rtos_tx_sp))
151
152target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
153  ${CMAKE_CURRENT_LIST_DIR}/./fsl_os_abstraction_threadx.c
154)
155
156target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
157  ${CMAKE_CURRENT_LIST_DIR}/./.
158)
159
160else()
161
162message(SEND_ERROR "component_osa_thread dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
163
164endif()
165
166endif()
167
168
169if (CONFIG_USE_component_common_task)
170# Add set(CONFIG_USE_component_common_task true) in config.cmake to use this component
171
172message("component_common_task component is included from ${CMAKE_CURRENT_LIST_FILE}.")
173
174if(CONFIG_USE_driver_common AND CONFIG_USE_component_osa)
175
176target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE
177  ${CMAKE_CURRENT_LIST_DIR}/../common_task/fsl_component_common_task.c
178)
179
180target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
181  ${CMAKE_CURRENT_LIST_DIR}/../common_task/.
182)
183
184else()
185
186message(SEND_ERROR "component_common_task dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.")
187
188endif()
189
190endif()
191
192