-
Notifications
You must be signed in to change notification settings - Fork 0
/
FindNovaCore_Bootloader.cmake
33 lines (27 loc) · 1.11 KB
/
FindNovaCore_Bootloader.cmake
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
IF( NOT NOVA_CORE_BOOTLOADER_ROOT )
IF( NOT NOVA_ROOT )
SET( NOVA_CORE_BOOTLOADER_ROOT /opt/nova/core-bootloader )
ELSE()
SET( NOVA_CORE_BOOTLOADER_ROOT ${NOVA_ROOT}/core-bootloader )
ENDIF()
MESSAGE( STATUS "No NOVA_CORE_BOOTLOADER_ROOT specified, using default: ${NOVA_CORE_BOOTLOADER_ROOT}" )
ENDIF()
SET( NOVA_CORE_BOOTLOADER_SOURCES
${NOVA_CORE_BOOTLOADER_ROOT}/src/Stubs.cpp
${NOVA_CORE_BOOTLOADER_ROOT}/src/blinker.cpp
${NOVA_CORE_BOOTLOADER_ROOT}/src/bootloader.cpp
${NOVA_CORE_BOOTLOADER_ROOT}/src/hw/hw_utils.cpp
${NOVA_CORE_BOOTLOADER_ROOT}/src/kk_ihex/kk_ihex_read.c
${NOVA_CORE_BOOTLOADER_ROOT}/src/kk_ihex/kk_ihex_write.c
)
SET( NOVA_CORE_BOOTLOADER_INCLUDE_DIRS
${NOVA_CORE_BOOTLOADER_ROOT}/include
)
IF( NOVA_CORE_BOOTLOADER_SOURCES )
LIST( REMOVE_DUPLICATES NOVA_CORE_BOOTLOADER_SOURCES )
ENDIF()
IF( NOVA_CORE_BOOTLOADER_INCLUDE_DIRS )
LIST( REMOVE_DUPLICATES NOVA_CORE_BOOTLOADER_INCLUDE_DIRS )
ENDIF()
INCLUDE( FindPackageHandleStandardArgs )
FIND_PACKAGE_HANDLE_STANDARD_ARGS( NovaCore_Bootloader DEFAULT_MSG NOVA_CORE_BOOTLOADER_SOURCES NOVA_CORE_BOOTLOADER_INCLUDE_DIRS )