@@ -11,29 +11,28 @@ if (NOT CFE_SYSTEM_PSPNAME)
1111endif ()
1212
1313set (CFE_PSP_TARGETNAME "${CFE_SYSTEM_PSPNAME} " )
14- add_definitions (-D_CFE_PSP_)
14+ add_definitions (-D_CFE_PSP_) # macro to indicate PSP scope
15+
16+ # The "psp_module_api" defines the interface between internal PSP components
17+ add_library (psp_module_api INTERFACE )
18+ target_compile_definitions (psp_module_api INTERFACE
19+ $<TARGET_PROPERTY:osal,INTERFACE_COMPILE_DEFINITIONS > # use defs from OSAL
20+ )
21+ target_include_directories (psp_module_api INTERFACE
22+ fsw/inc # public API
23+ fsw/shared/inc # all PSP shared headers
24+ ${CFE_SOURCE_DIR} /cmake/target /inc # for sysconfig
25+ $<TARGET_PROPERTY:osal,INTERFACE_INCLUDE_DIRECTORIES > # use headers from OSAL
26+ )
27+
1528
1629# The PSP is currently built in two parts, consisting of a fully platform-specific
1730# module combined with a shared component which is built for multiple targets.
1831# The "shared" component is compiled using headers from the platform-specific module
1932# so it is still ultimately a platform-specific binary, and it all gets wrapped into
2033# a single PSP static library target.
21- include_directories (
22- fsw/inc
23- fsw/shared/inc # all local stuff
24- ${CFE_SOURCE_DIR} /cmake/target /inc # for sysconfig
25- $<TARGET_PROPERTY:osal,INTERFACE_INCLUDE_DIRECTORIES > # headers from OSAL
26- )
27-
2834add_subdirectory (fsw/${CFE_PSP_TARGETNAME} ${CFE_PSP_TARGETNAME} -impl)
29- target_compile_definitions (psp-${CFE_PSP_TARGETNAME} -impl PUBLIC
30- $<TARGET_PROPERTY:osal,INTERFACE_COMPILE_DEFINITIONS > # defs from OSAL
31- )
32-
3335add_subdirectory (fsw/shared ${CFE_PSP_TARGETNAME} -shared)
34- target_compile_definitions (psp-${CFE_PSP_TARGETNAME} -shared PUBLIC
35- $<TARGET_PROPERTY:osal,INTERFACE_COMPILE_DEFINITIONS > # defs from OSAL
36- )
3736
3837add_library (psp-${CFE_PSP_TARGETNAME} STATIC
3938 $<TARGET_OBJECTS:psp-${CFE_PSP_TARGETNAME} -shared>
0 commit comments