diff options
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/kicad_gerber.cmake | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/cmake/kicad_gerber.cmake b/cmake/kicad_gerber.cmake index 8c189c6..327733c 100644 --- a/cmake/kicad_gerber.cmake +++ b/cmake/kicad_gerber.cmake @@ -1,5 +1,5 @@ function(kicad_gerber) - set(options ALL UPPERCASE_EXTENSIONS) + set(options ALL UPPERCASE_EXTENSIONS SHOW_OUTPUTS) set(one_value_args TARGET PCB_FILE DIR ZIP_FILE NAMING_STYLE) set(multi_value_args LAYER_EXTENSION) cmake_parse_arguments(ARGS "${options}" "${one_value_args}" "${multi_value_args}" ${ARGN}) @@ -48,8 +48,11 @@ function(kicad_gerber) set(prefix "${out_dir}/${basename}") execute_process( - COMMAND "${KicadUtilsPyDir}/kicad_gerber.py" --pcb "${pcb_file}" --output-directory "${out_dir}" ${protel} ${uppercase_extensions} ${les} --detect-files-only - OUTPUT_FILE ${CMAKE_CURRENT_BINARY_DIR}/${target}-gerber-index.txt + COMMAND "${KicadUtilsPyDir}/kicad_gerber.py" + --pcb "${pcb_file}" + --output-directory "${out_dir}" + --detect-files-only ${CMAKE_CURRENT_BINARY_DIR}/${target}-gerber-index.txt + ${protel} ${uppercase_extensions} ${les} OUTPUT_VARIABLE out ERROR_VARIABLE out RESULT_VARIABLE res) @@ -62,7 +65,12 @@ function(kicad_gerber) file(STRINGS ${CMAKE_CURRENT_BINARY_DIR}/${target}-gerber-index.txt outputs) list(SORT outputs) - message("outputs=${outputs}") + if (ARGS_SHOW_OUTPUTS) + foreach(o ${outputs}) + get_filename_component(o ${o} NAME) + message("Gerber output file: ${o}") + endforeach() + endif() add_custom_command( OUTPUT ${outputs} COMMAND cmake -E make_directory "${out_dir}" |