diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2016-08-19 08:06:17 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2016-08-19 08:06:17 +0200 |
commit | e4444b71b96c896690817a02cf66199183b68a19 (patch) | |
tree | 37d1fc4a80487edc1baec87911ba8c4aabc5f5de /cmake | |
parent | a870407b91ef5a38c76bfb975fcc84f7225dd6d2 (diff) | |
download | kicad-utils-e4444b71b96c896690817a02cf66199183b68a19.tar.gz kicad-utils-e4444b71b96c896690817a02cf66199183b68a19.tar.bz2 kicad-utils-e4444b71b96c896690817a02cf66199183b68a19.tar.xz kicad-utils-e4444b71b96c896690817a02cf66199183b68a19.zip |
o Adding complete documentation for the kicad_generate_header goal.
kicad_generate_header: Append the global variable `KICAD_GEN_TEMPLATE_LIBS` to the template search list.
o Adding back the examples.
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/KicadUtilsConfig.cmake | 1 | ||||
-rw-r--r-- | cmake/kicad_generate_header.cmake | 17 |
2 files changed, 13 insertions, 5 deletions
diff --git a/cmake/KicadUtilsConfig.cmake b/cmake/KicadUtilsConfig.cmake index 1cb682d..a2e6419 100644 --- a/cmake/KicadUtilsConfig.cmake +++ b/cmake/KicadUtilsConfig.cmake @@ -1,3 +1,4 @@ +set(kicad_generate_header_cmd KicadUtils::generate-header) include("${CMAKE_CURRENT_LIST_DIR}/kicad_generate_header.cmake") include("${CMAKE_CURRENT_LIST_DIR}/kicad_pcb_plot.cmake") include("${CMAKE_CURRENT_LIST_DIR}/KicadUtilsTargets.cmake") diff --git a/cmake/kicad_generate_header.cmake b/cmake/kicad_generate_header.cmake index 0514a34..bf7ad2e 100644 --- a/cmake/kicad_generate_header.cmake +++ b/cmake/kicad_generate_header.cmake @@ -41,19 +41,26 @@ function(kicad_generate_header) set(template "${kicad_gen_TEMPLATE}") endif () - set(lib "-l;${CMAKE_CURRENT_SOURCE_DIR}") - foreach (l IN LISTS kicad_gen_TEMPLATE_LIB_LIST) - list(APPEND lib -l "${l}") - endforeach () + if (kicad_gen_TEMPLATE_LIB_LIST) + foreach (l IN LISTS kicad_gen_TEMPLATE_LIB_LIST) + list(APPEND lib -l "${l}") + endforeach () + endif () + if (KICAD_GEN_TEMPLATE_LIBS) + foreach (l IN LISTS KICAD_GEN_TEMPLATE_LIBS) + list(APPEND lib -l "${l}") + endforeach () + endif () set(output_file "${output_dir}/${output}") file(RELATIVE_PATH output_file_rel "${output_rel_dir}" ${output_file}) # message("kicad_generate_header: output_file=${output_file}") # message("kicad_generate_header: output_file_rel=${output_file_rel}") + message("kicad_generate_header: kicad_generate_header_cmd=${kicad_generate_header_cmd}") add_custom_command(OUTPUT "${output_file}" - COMMAND KicadUtils::generate-header -n ${NET} -r ${REF} -o ${output_file} ${t} ${template} ${lib} + COMMAND ${kicad_generate_header_cmd} -n ${NET} -r ${REF} -o ${output_file} ${t} ${template} ${lib} MAIN_DEPENDENCY ${NET} COMMENT "Generating ${output_file_rel}") |