-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
32 lines (26 loc) · 1005 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
cmake_minimum_required(VERSION 2.6.4)
project(CFS_HWLIB C)
# flight/nos psp names (based on CFE_SYSTEM_PSPNAME set by the toolchain from targets.cmake)
set(NOS_PSPNAME "nos-linux")
include(../../../components/ComponentSettings.cmake)
# hwlib include directories
include_directories(fsw/mission_inc
fsw/platform_inc
fsw/public_inc)
# include directories for flight configuration
IF(CFE_SYSTEM_PSPNAME STREQUAL "pc-linux")
message(STATUS "hwlib: linux configuration")
aux_source_directory(fsw/linux APP_SRC_FILES)
ELSE()
message(STATUS "hwlib: NON-FLIGHT configuration")
ENDIF()
# create the hwlib app module
aux_source_directory(fsw/src APP_SRC_FILES)
add_cfe_app(hwlib ${APP_SRC_FILES})
# stub out hardware for all non-flight configurations
IF(CFE_SYSTEM_PSPNAME STREQUAL NOS_PSPNAME)
add_subdirectory(sim)
target_link_libraries(hwlib noslink)
ELSEIF(CFE_SYSTEM_PSPNAME STREQUAL "pc-linux")
target_link_libraries(hwlib socketcan)
ENDIF()