aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2017-08-17 16:39:39 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2017-08-17 16:39:39 +0200
commitf265f77c943971000e2a298274d23772cf0d2411 (patch)
tree14bd90ef56b12f7b9540f8910fb4aa2dd2acf088 /cmake
parente640b3b361a401b4670be04badf14f610a8ad62a (diff)
downloadkicad-utils-f265f77c943971000e2a298274d23772cf0d2411.tar.gz
kicad-utils-f265f77c943971000e2a298274d23772cf0d2411.tar.bz2
kicad-utils-f265f77c943971000e2a298274d23772cf0d2411.tar.xz
kicad-utils-f265f77c943971000e2a298274d23772cf0d2411.zip
o Adding support for --extended-gerber-attributes and EXTENDED_GERBER_ATTRIBUTES. Changing the hardcoded value True to default False and enabling on option.
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)