correct interface and private includes
This commit is contained in:
parent
c0099481a1
commit
e030d7ed97
@ -95,8 +95,26 @@ if(NOT FSFW_CONFIG_PATH)
|
|||||||
add_subdirectory(defaultcfg/fsfwconfig)
|
add_subdirectory(defaultcfg/fsfwconfig)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# FSFW might be part of a possibly complicated folder structure, so we
|
||||||
|
# extract the absolute path of the fsfwconfig folder.
|
||||||
|
if(IS_ABSOLUTE ${FSFW_CONFIG_PATH})
|
||||||
|
set(${FSFW_CONFIG_PATH_ABSOLUTE} ${FSFW_CONFIG_PATH})
|
||||||
|
else()
|
||||||
|
get_filename_component(${FSFW_CONFIG_PATH_ABSOLUTE}
|
||||||
|
${FSFW_CONFIG_PATH} ABSOLUTE
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
# Required include paths to compile the FSFW
|
# Required include paths to compile the FSFW
|
||||||
target_include_directories(${LIB_FSFW_NAME}
|
target_include_directories(${LIB_FSFW_NAME} INTERFACE
|
||||||
INTERFACE
|
${CMAKE_SOURCE_DIR}
|
||||||
${FSFW_CONFIG_PATH}
|
${FSFW_CONFIG_PATH_ABSOLUTE}
|
||||||
|
)
|
||||||
|
|
||||||
|
# Includes path required to compile FSFW itself as well
|
||||||
|
# We assume that the fsfwconfig folder uses include relative to the project
|
||||||
|
# root here!
|
||||||
|
target_include_directories(${LIB_FSFW_NAME} PRIVATE
|
||||||
|
${CMAKE_SOURCE_DIR}
|
||||||
|
${FSFW_CONFIG_PATH_ABSOLUTE}
|
||||||
)
|
)
|
||||||
|
@ -11,8 +11,19 @@ target_sources(${LIB_FSFW_NAME}
|
|||||||
MutexFactory.cpp
|
MutexFactory.cpp
|
||||||
PeriodicTask.cpp
|
PeriodicTask.cpp
|
||||||
QueueFactory.cpp
|
QueueFactory.cpp
|
||||||
QueueMapManager.cpp
|
|
||||||
SemaphoreFactory.cpp
|
SemaphoreFactory.cpp
|
||||||
TaskFactory.cpp
|
TaskFactory.cpp
|
||||||
Timekeeper.cpp
|
Timekeeper.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# FreeRTOS is required to link the FSFW now. It is recommended to compile
|
||||||
|
# FreeRTOS as a static library and set LIB_OS_NAME to the target name of the
|
||||||
|
# library.
|
||||||
|
if(NOT LIB_OS_NAME)
|
||||||
|
message(FATAL_ERROR
|
||||||
|
"FreeRTOS needs to be linked as a target and "
|
||||||
|
"LIB_OS_NAME needs to be set to the target"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
target_link_libraries(${LIB_FSWFW_NAME} ${LIB_OS_NAME})
|
Loading…
x
Reference in New Issue
Block a user