cmake_minimum_required(VERSION 3.22) project(s8-bathlight C ASM) include(./_cmake/sdcc.cmake) include_directories(./_common) add_executable(s8-bathlight src/main.c ) target_link_libraries(s8-bathlight) target_compile_definitions(s8-bathlight PUBLIC F_CPU=16000000UL ) set_target_properties(s8-bathlight PROPERTIES COMPILE_FLAGS "-mstm8 --nolospre --opt-code-size" LINK_FLAGS "-mstm8" FAMILY stm8 PART stm8s103f3 ) target_include_directories(s8-bathlight PUBLIC ../_common ) set_target_properties(s8-bathlight PROPERTIES COMPILE_FLAGS "-mstm8 --nolospre --opt-code-size" LINK_FLAGS "-mstm8" FAMILY stm8 PART stm8s103f3 ) add_upload_to_target(s8-bathlight)