Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 20 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,33 @@ add_definitions(-D_CFE_PSP_)
# The "shared" component is compiled using headers from the platform-specific module
# so it is still ultimately a platform-specific binary, and it all gets wrapped into
# a single PSP static library target.
include_directories(fsw/shared/inc)
include_directories(
fsw/inc
fsw/shared/inc # all local stuff
${CFE_SOURCE_DIR}/cmake/target/inc # for sysconfig
$<TARGET_PROPERTY:osal,INTERFACE_INCLUDE_DIRECTORIES> # headers from OSAL
)

add_subdirectory(fsw/${CFE_PSP_TARGETNAME} ${CFE_PSP_TARGETNAME}-impl)
target_compile_definitions(psp-${CFE_PSP_TARGETNAME}-impl PUBLIC
$<TARGET_PROPERTY:osal,INTERFACE_COMPILE_DEFINITIONS> # defs from OSAL
)

add_subdirectory(fsw/shared ${CFE_PSP_TARGETNAME}-shared)
target_compile_definitions(psp-${CFE_PSP_TARGETNAME}-shared PUBLIC
$<TARGET_PROPERTY:osal,INTERFACE_COMPILE_DEFINITIONS> # defs from OSAL
)

add_library(psp-${CFE_PSP_TARGETNAME} STATIC
$<TARGET_OBJECTS:psp-${CFE_PSP_TARGETNAME}-shared>
$<TARGET_OBJECTS:psp-${CFE_PSP_TARGETNAME}-impl>
)


target_include_directories(psp-${CFE_PSP_TARGETNAME} INTERFACE
fsw/inc
)


if (ENABLE_UNIT_TESTS)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/ut-stubs)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/unit-test-coverage)
Expand Down