-
Notifications
You must be signed in to change notification settings - Fork 11
/
CMakeLists.txt
48 lines (37 loc) · 1.56 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Copyright (c) 2023 CogniPilot Foundation
# SPDX-License-Identifier: Apache-2.0
#
# This CMake file is picked by the Zephyr build system because it is defined
# as the module CMake entry point (see zephyr/module.yml).
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
zephyr_include_directories(include)
find_program(POETRY poetry)
if (NOT POETRY)
message(FATAL_ERROR "install poetry via: apt install python3-poetry or pipx install poetry")
endif()
set(CEREBRI_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set(CYECCA_PYTHON ${CEREBRI_ROOT_DIR}/scripts/cyecca_python)
execute_process(
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/scripts/cyecca_install
COMMAND_ECHO STDOUT
)
add_subdirectory(lib)
add_subdirectory(drivers)
set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/../install)
install(PROGRAMS ${CMAKE_BINARY_DIR}/zephyr/zephyr.bin
DESTINATION ${CMAKE_INSTALL_PREFIX}/bin
RENAME cerebri_${CONFIG_CEREBRI_APP_NAME}_${BOARD} OPTIONAL)
install(PROGRAMS ${CMAKE_BINARY_DIR}/zephyr/zephyr.exe
DESTINATION ${CMAKE_INSTALL_PREFIX}/bin
RENAME cerebri_${CONFIG_CEREBRI_APP_NAME}_${BOARD} OPTIONAL)
install(FILES ${CMAKE_SOURCE_DIR}/../../scripts/setup.sh
DESTINATION ${CMAKE_INSTALL_PREFIX})
set(CPACK_PACKAGE_NAME cerebri_${CONFIG_CEREBRI_APP_NAME})
set(CPACK_GENERATOR "DEB;TGZ")
set(CPACK_DEBIAN_PACKAGE_DEPENDS)
set(CPACK_SYSTEM_NAME "${BOARD}")
set(CPACK_PACKAGE_VERSION_MAJOR "${CONFIG_CEREBRI_VERSION_MAJOR}")
set(CPACK_PACKAGE_VERSION_MINOR "${CONFIG_CEREBRI_VERSION_MINOR}")
set(CPACK_PACKAGE_VERSION_PATCH "${CONFIG_CEREBRI_VERSION_PATCH}")
set(CPACK_PACKAGE_CONTACT [email protected])
include(CPack)