-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
33 lines (29 loc) · 1.24 KB
/
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
33
include(${CMAKE_SOURCE_DIR}/cmake/nativeCompile.cmake)
#
# The beacon executable is built using the beacon.c source file
#
add_library(beaconUtil BeaconStatus.cpp BeaconStatus.h)
target_include_directories(beaconUtil PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
add_executable(beacon beacon.c beacon.cmd.cfg)
add_executable(beaconDecoder beaconDecoder.cpp)
target_link_libraries(beaconDecoder beaconUtil)
add_executable(beaconSim beaconSim.cpp)
#
# Install the beacon binary to the bin directory when the "install" target is
# called
#
INSTALL(TARGETS beacon DESTINATION bin COMPONENT binaries)
INSTALL(FILES beacon.cmd.cfg DESTINATION /etc/ COMPONENT config)
#
# Libraries that beacon depends on
#
target_link_libraries(beacon proc pthread)
IF (PROJECT_COMPILE)
# temporarily omit Beacon tests until comms implements them
add_subdirectory(test)
# Include directories to search in
target_include_directories(beacon PUBLIC /opt/toolchain/toolchain-arm-linux/include)
target_include_directories(beaconDecoder PUBLIC /opt/toolchain/toolchain-arm-linux/include)
target_include_directories(beaconUtil PUBLIC /opt/toolchain/toolchain-arm-linux/include)
target_include_directories(beaconSim PUBLIC /opt/toolchain/toolchain-arm-linux/include)
ENDIF (PROJECT_COMPILE)