X-Git-Url: https://jxself.org/git/?p=carl9170fw.git;a=blobdiff_plain;f=carlfw%2FCMakeLists.txt;h=1c1b55142285b8119c3db4eb49a4cd1c4101062f;hp=8647a759d3e17a89d5883420a75c1c3b4ace1c30;hb=HEAD;hpb=d63574311a70fc337ac5337620d6102ef2d3e23c diff --git a/carlfw/CMakeLists.txt b/carlfw/CMakeLists.txt index 8647a75..1c1b551 100644 --- a/carlfw/CMakeLists.txt +++ b/carlfw/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8) +cmake_minimum_required(VERSION 3.0) project(carl9170.fw) @@ -39,13 +39,14 @@ set_target_properties(carl9170.elf PROPERTIES LINKER_LANGUAGE C) set_target_properties(carl9170.elf PROPERTIES COMPILE_FLAGS "${CARLFW_CFLAGS}") set_target_properties(carl9170.elf PROPERTIES LINK_FLAGS "${CARLFW_CFLAGS} -Wl,-Tcarl9170.lds") -add_custom_target(firmware ALL) +add_custom_target(firmware ALL DEPENDS carl9170.elf) add_custom_command( DEPENDS carl9170.elf COMMAND ${OBJCOPY} ARGS --strip-unneeded -O binary -R .sram -R .eeprom -R .fwdsc carl9170.elf carl9170.bin TARGET firmware + BYPRODUCTS carl9170.bin OUTPUTS carl9170.bin) add_custom_command( @@ -53,6 +54,7 @@ add_custom_command( COMMAND ${OBJCOPY} ARGS --strip-unneeded -O binary -j .fwdsc carl9170.elf carl9170.dsc TARGET firmware + BYPRODUCTS carl9170.dsc OUTPUTS carl9170.dsc) add_custom_command(