-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeList1.txt
50 lines (29 loc) · 1.15 KB
/
CMakeList1.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
cmake_minimum_required(VERSION 2.6)
MACRO (TODAY RESULT)
EXECUTE_PROCESS(COMMAND "date" "+%Y%m%d" OUTPUT_VARIABLE ${RESULT})
string(REGEX REPLACE "(..)/(..)/..(..).*" "\\1\\2\\3" ${RESULT} ${${RESULT}})
string(REGEX REPLACE "(\r?\n)+$" "" ${RESULT} ${${RESULT}})
ENDMACRO (TODAY)
SET(CMAKE_SYSTEM_NAME Generic)
SET(CMAKE_C_COMPILER avr-gcc)
SET(CMAKE_CXX_COMPILER avr-g++)
Project(cheali-charger-mod)
TODAY(RESULT)
set(cheali-charger-buildnumber ${RESULT})
set(cheali-charger-version 0.33m)
set(cheali-charger-eeprom-calibration-version 8)
set(cheali-charger-eeprom-programdata-version 51)
set(cheali-charger-eeprom-settings-version 56)
configure_file(src/core/Version.h.in src/core/Version.h)
if(ARM-Cortex-M0)
message(STATUS "target: ARM-Cortex-M0")
include(arm-compiler.cmake)
add_subdirectory(src/core)
add_subdirectory(src/hardware/imaxB6-clone-ARM-Cortex-M0)
else(ARM-Cortex-M0)
message(STATUS "target: avr")
message(STATUS "Compilation date = ${RESULT}")
include(avr-compiler.cmake)
add_subdirectory(src/core/atmega32)
add_subdirectory(src/hardware/50W-5A)
endif(ARM-Cortex-M0)