aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake')
-rw-r--r--cmake/kicad_gerber.cmake19
1 files changed, 16 insertions, 3 deletions
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)