From 69b9d30a3057ea2d7170d15edbae15f4e56cdcc3 Mon Sep 17 00:00:00 2001 From: FintasticMan Date: Thu, 16 Nov 2023 10:39:48 +0100 Subject: p8: Fix build when building for P8 variants Building with a TARGET_DEVICE set to any of the P8 variants' names caused the build to fail, because they contained hyphens. The build defines a macro `TARGET_DEVICE_$VARIANT`, which fails if `$VARIANT` contains a hyphen. --- src/CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/CMakeLists.txt') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index dc718bab..4207161e 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -805,18 +805,18 @@ add_definitions(-DTARGET_DEVICE_NAME="${TARGET_DEVICE}") if(TARGET_DEVICE STREQUAL "PINETIME") add_definitions(-DDRIVER_PINMAP_PINETIME) add_definitions(-DCLOCK_CONFIG_LF_SRC=1) # XTAL -elseif(TARGET_DEVICE STREQUAL "MOY-TFK5") # P8a +elseif(TARGET_DEVICE STREQUAL "MOY_TFK5") # P8a add_definitions(-DDRIVER_PINMAP_P8) add_definitions(-DCLOCK_CONFIG_LF_SRC=1) # XTAL -elseif(TARGET_DEVICE STREQUAL "MOY-TIN5") # P8a variant 2 +elseif(TARGET_DEVICE STREQUAL "MOY_TIN5") # P8a variant 2 add_definitions(-DDRIVER_PINMAP_P8) add_definitions(-DCLOCK_CONFIG_LF_SRC=1) # XTAL -elseif(TARGET_DEVICE STREQUAL "MOY-TON5") # P8b +elseif(TARGET_DEVICE STREQUAL "MOY_TON5") # P8b add_definitions(-DDRIVER_PINMAP_P8) add_definitions(-DCLOCK_CONFIG_LF_SRC=0) # RC add_definitions(-DMYNEWT_VAL_BLE_LL_SCA=500) add_definitions(-DCLOCK_CONFIG_LF_CAL_ENABLED=1) -elseif(TARGET_DEVICE STREQUAL "MOY-UNK") # P8b mirrored +elseif(TARGET_DEVICE STREQUAL "MOY_UNK") # P8b mirrored add_definitions(-DDRIVER_PINMAP_P8) add_definitions(-DCLOCK_CONFIG_LF_SRC=0) # RC add_definitions(-DMYNEWT_VAL_BLE_LL_SCA=500) -- cgit v1.2.3-70-g09d2