forked from nasa/elf2cfetbl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
32 lines (24 loc) · 893 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 snippet for building elf2cfetbl
#
project(CFS_TABLETOOL C)
add_executable(elf2cfetbl elf2cfetbl.c)
# Export relevant information so the parent script can invoke the tool
set(CFS_TABLETOOL_SCRIPT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/scripts" CACHE INTERNAL "CFS table tool script directory")
add_custom_target(tabletool-execute
COMMAND $(MAKE)
CC="${CMAKE_C_COMPILER}"
CFLAGS="${CMAKE_C_FLAGS}"
AR="${CMAKE_AR}"
TBLTOOL="$<TARGET_FILE:elf2cfetbl>"
cfetables
WORKING_DIRECTORY
"${MISSION_BINARY_DIR}/tables"
DEPENDS
mission-cfetables
elf2cfetbl
)
add_dependencies(mission-all tabletool-execute)
add_dependencies(mission-install tabletool-execute)
add_dependencies(mission-prebuild elf2cfetbl)
install(DIRECTORY ${CMAKE_BINARY_DIR}/tables/staging/ DESTINATION .)
install(TARGETS elf2cfetbl DESTINATION host)