From f265f77c943971000e2a298274d23772cf0d2411 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Thu, 17 Aug 2017 16:39:39 +0200 Subject: o Adding support for --extended-gerber-attributes and EXTENDED_GERBER_ATTRIBUTES. Changing the hardcoded value True to default False and enabling on option. --- cmake/kicad_gerber.cmake | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'cmake') diff --git a/cmake/kicad_gerber.cmake b/cmake/kicad_gerber.cmake index 327733c..5495e0e 100644 --- a/cmake/kicad_gerber.cmake +++ b/cmake/kicad_gerber.cmake @@ -1,5 +1,5 @@ function(kicad_gerber) - set(options ALL UPPERCASE_EXTENSIONS SHOW_OUTPUTS) + set(options ALL UPPERCASE_EXTENSIONS SHOW_OUTPUTS EXTENDED_GERBER_ATTRIBUTES) 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}) @@ -44,6 +44,10 @@ function(kicad_gerber) set(uppercase_extensions --uppercase-extensions) endif () + if (ARGS_EXTENDED_GERBER_ATTRIBUTES) + set(extended_gerber_attributes "--extended-gerber-attributes") + endif () + set(out_dir "${ARGS_DIR}") set(prefix "${out_dir}/${basename}") @@ -52,7 +56,10 @@ function(kicad_gerber) --pcb "${pcb_file}" --output-directory "${out_dir}" --detect-files-only ${CMAKE_CURRENT_BINARY_DIR}/${target}-gerber-index.txt - ${protel} ${uppercase_extensions} ${les} + ${protel} + ${uppercase_extensions} + ${extended_gerber_attributes} + ${les} OUTPUT_VARIABLE out ERROR_VARIABLE out RESULT_VARIABLE res) @@ -74,7 +81,13 @@ function(kicad_gerber) add_custom_command( OUTPUT ${outputs} COMMAND cmake -E make_directory "${out_dir}" - COMMAND "${KicadUtilsPyDir}/kicad_gerber.py" --pcb "${pcb_file}" --output-directory "${out_dir}" ${protel} ${uppercase_extensions} ${les} + COMMAND "${KicadUtilsPyDir}/kicad_gerber.py" + --pcb "${pcb_file}" + --output-directory "${out_dir}" + ${protel} + ${uppercase_extensions} + ${extended_gerber_attributes} + ${les} MAIN_DEPENDENCY "${pcb_file}") if (ARGS_ALL) -- cgit v1.2.3