diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index f6aaf62a..1da460c4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,8 @@ cmake_minimum_required(VERSION 3.10) -project(pinetime VERSION 1.9.0 LANGUAGES C CXX ASM) + +set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose Debug or Release") + +project(pinetime VERSION 1.10.0 LANGUAGES C CXX ASM) set(CMAKE_C_STANDARD 99) set(CMAKE_CXX_STANDARD 14) @@ -51,14 +54,13 @@ if(BUILD_DFU) set(BUILD_DFU true) endif() -option(WATCH_COLMI_P8 "Build for the Colmi P8" OFF) -set(TARGET_DEVICE "PineTime") - -if(WATCH_COLMI_P8) - set(TARGET_DEVICE "Colmi P8") - add_definitions(-DWATCH_P8) +if(BUILD_RESOURCES) + set(BUILD_RESOURCES true) endif() +set(TARGET_DEVICE "PINETIME" CACHE STRING "Target device") +set_property(CACHE TARGET_DEVICE PROPERTY STRINGS PINETIME MOY-TFK5 MOY-TIN5 MOY-TON5 MOY-UNK) + set(PROJECT_GIT_COMMIT_HASH "") execute_process(COMMAND git rev-parse --short HEAD @@ -70,8 +72,10 @@ string(STRIP "${PROJECT_GIT_COMMIT_HASH}" PROJECT_GIT_COMMIT_HASH) message("PROJECT_GIT_COMMIT_HASH_SUCCESS? " ${PROJECT_GIT_COMMIT_HASH_SUCCESS}) +message("") message("BUILD CONFIGURATION") message("-------------------") +message(" * Mode : " ${CMAKE_BUILD_TYPE}) message(" * Version : " ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}) message(" * Toolchain : " ${ARM_NONE_EABI_TOOLCHAIN_PATH}) message(" * GitRef(S) : " ${PROJECT_GIT_COMMIT_HASH}) @@ -98,6 +102,11 @@ if(BUILD_DFU) else() message(" * Build DFU (using adafruit-nrfutil) : Disabled") endif() +if(BUILD_RESOURCES) + message(" * Build resources : Enabled") +else() + message(" * Build resources : Disabled") +endif() set(VERSION_EDIT_WARNING "// Do not edit this file, it is automatically generated by CMAKE!") configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/Version.h.in ${CMAKE_CURRENT_BINARY_DIR}/src/Version.h) |