-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathlibparams.cmake
More file actions
35 lines (29 loc) · 1.14 KB
/
libparams.cmake
File metadata and controls
35 lines (29 loc) · 1.14 KB
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
# Copyright (c) 2023-2025 Dmitry Ponomarev <ponomarevda96@gmail.com>
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
cmake_minimum_required(VERSION 3.22)
if(LIBPARAMS_PLATFORM STREQUAL "stm32f103")
elseif(LIBPARAMS_PLATFORM STREQUAL "stm32g0b1")
elseif(LIBPARAMS_PLATFORM STREQUAL "stm32h753xx")
elseif(LIBPARAMS_PLATFORM STREQUAL "ubuntu")
else()
message(SEND_ERROR "LIBPARAMS_PLATFORM is not specified! Options: stm32f103, stm32g0b1, stm32h753xx, ubuntu.")
endif()
FILE(GLOB libparamsPlatformSpecificSrc
${CMAKE_CURRENT_LIST_DIR}/platform_specific/${LIBPARAMS_PLATFORM}/*.c*
)
FILE(GLOB libparamsPlatformSpecificHeaders
${CMAKE_CURRENT_LIST_DIR}/platform_specific/${LIBPARAMS_PLATFORM}/
)
set(libparamsSrc
${CMAKE_CURRENT_LIST_DIR}/src/rom.c
${CMAKE_CURRENT_LIST_DIR}/src/storage.c
${libparamsPlatformSpecificSrc}
)
set(libparamsHeaders
${CMAKE_CURRENT_LIST_DIR}/include/libparams/
${CMAKE_CURRENT_LIST_DIR}/platform_specific/${LIBPARAMS_PLATFORM}/
${libparamsPlatformSpecificHeaders}
)