2011-09-08 05:58:45 +00:00
|
|
|
# This program source code file is part of KICAD, a free EDA CAD application.
|
|
|
|
#
|
|
|
|
# Copyright (C) 2011 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
|
2018-03-25 14:18:22 +00:00
|
|
|
# Copyright (C) 2011-2018 Kicad Developers, see AUTHORS.txt for contributors.
|
2011-09-08 05:58:45 +00:00
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU General Public License
|
|
|
|
# as published by the Free Software Foundation; either version 2
|
|
|
|
# of the License, or (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, you may find one here:
|
|
|
|
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
|
|
|
# or you may search the http://www.gnu.org website for the version 2 license,
|
|
|
|
# or you may write to the Free Software Foundation, Inc.,
|
|
|
|
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
#
|
|
|
|
|
|
|
|
# In this directory, a number of different processes are managed:
|
|
|
|
#
|
2021-03-11 22:16:35 +00:00
|
|
|
# 1) PNG files are created from SVG files for each icon theme and needed bitmap resolution
|
|
|
|
# 2) An images.tar.gz file is created from all the PNG files
|
2011-09-08 05:58:45 +00:00
|
|
|
|
2021-03-11 22:16:35 +00:00
|
|
|
# Step 2) is universal and is done for any builder, whereas step 1) is
|
2011-09-08 05:58:45 +00:00
|
|
|
# optional and depend on MAINTAIN_PNGS being defined in CMake. The reason we
|
2021-03-11 22:16:35 +00:00
|
|
|
# can skip 1) is that the *.PNG files are part of the source tree so
|
|
|
|
# do not need to rebuilt by a typical builder. However, because the *.PNG files
|
2011-09-08 05:58:45 +00:00
|
|
|
# are part of the source tree, and subject to version control, they should be built
|
|
|
|
# only when needed, otherwise this results in a diff for the version control system.
|
2021-03-11 22:16:35 +00:00
|
|
|
# Therefore step 1) is driven by CMake (if MAINTAIN_PNGS) which gives
|
|
|
|
# us conditional *.PNG building based on an edit to the respective *.SVG file.
|
2011-09-08 05:58:45 +00:00
|
|
|
|
|
|
|
# If MAINTAIN_PNGS is not defined, then you are a normal builder and no special
|
2021-03-11 22:16:35 +00:00
|
|
|
# tools are required. If MAINTAIN_PNGS is defined, then you are a PNG maintainer
|
2011-09-08 05:58:45 +00:00
|
|
|
# and will need the following tools findable in your PATH:
|
|
|
|
#
|
2012-09-28 17:47:41 +00:00
|
|
|
# 1) inkscape - command line mode is used, must be on your PATH
|
|
|
|
# 2) pngcrush - this program must be on your PATH
|
2011-09-08 05:58:45 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
# lower case is used for local variables, uppercase for global variables
|
|
|
|
|
|
|
|
option( MAINTAIN_PNGS
|
|
|
|
"Set to true if you are a PNG maintainer and have the required tools given in the bitmaps_png/CMakeLists.txt file (default OFF)."
|
2011-09-08 20:27:02 +00:00
|
|
|
OFF)
|
2011-09-08 05:58:45 +00:00
|
|
|
|
2012-09-28 17:47:41 +00:00
|
|
|
# Used Only to maintain PNG files (and therefore to recreate .cpp files)
|
|
|
|
# The png2cpp creates files with native End of Line format.
|
|
|
|
|
2021-03-11 22:16:35 +00:00
|
|
|
# List of themes - each corresponds to a folder of SVGS in ./bitmaps_png/sources/
|
2021-03-08 02:59:07 +00:00
|
|
|
set( THEMES
|
|
|
|
light
|
|
|
|
dark )
|
|
|
|
|
2011-09-08 05:58:45 +00:00
|
|
|
# Plan for three sizes of bitmaps:
|
2016-09-21 15:52:41 +00:00
|
|
|
# SMALL - for menus - 16 x 16
|
2020-12-11 01:02:54 +00:00
|
|
|
# MID - for toolbars - 24 x 24
|
2016-09-21 15:52:41 +00:00
|
|
|
# BIG - for program icons - 48 x 48
|
2020-09-11 07:51:00 +00:00
|
|
|
# which are given on three basename lists: BMAPS_SMALL, BMAPS_MID,and BMAPS_BIG
|
2011-09-08 05:58:45 +00:00
|
|
|
# respectively. The basename is without file extension and without path.
|
|
|
|
# A corresponding ${basename}.svg file must exist in 'sources' dir below here.
|
|
|
|
|
2012-09-28 17:47:41 +00:00
|
|
|
|
2018-02-28 09:44:22 +00:00
|
|
|
# small icons (16x16) needed in listboxes and dialog buttons
|
2011-09-08 05:58:45 +00:00
|
|
|
set( BMAPS_SMALL
|
2020-12-22 01:17:13 +00:00
|
|
|
icon_bitmap2component_16
|
|
|
|
icon_eeschema_16
|
|
|
|
icon_gerbview_16
|
|
|
|
icon_kicad_16
|
|
|
|
icon_libedit_16
|
|
|
|
icon_modedit_16
|
2020-12-22 17:31:03 +00:00
|
|
|
icon_pagelayout_editor_16
|
|
|
|
icon_pcbcalculator_16
|
2020-12-22 01:17:13 +00:00
|
|
|
icon_pcbnew_16
|
2021-02-06 15:52:57 +00:00
|
|
|
list_nets_16
|
|
|
|
options_generic_16
|
2011-10-18 19:18:04 +00:00
|
|
|
pinorient_right
|
|
|
|
pinorient_left
|
|
|
|
pinorient_up
|
|
|
|
pinorient_down
|
|
|
|
pinshape_normal
|
|
|
|
pinshape_invert
|
|
|
|
pinshape_clock_normal
|
|
|
|
pinshape_clock_invert
|
|
|
|
pinshape_active_low_input
|
|
|
|
pinshape_clock_active_low
|
|
|
|
pinshape_active_low_output
|
|
|
|
pinshape_clock_fall
|
|
|
|
pinshape_nonlogic
|
|
|
|
pintype_input
|
|
|
|
pintype_output
|
|
|
|
pintype_bidi
|
|
|
|
pintype_3states
|
|
|
|
pintype_passive
|
|
|
|
pintype_notspecif
|
|
|
|
pintype_powerinput
|
|
|
|
pintype_poweroutput
|
|
|
|
pintype_opencoll
|
|
|
|
pintype_openemit
|
2021-01-22 13:04:43 +00:00
|
|
|
pintype_nic
|
2011-10-18 19:18:04 +00:00
|
|
|
pintype_noconnect
|
2018-02-28 09:44:22 +00:00
|
|
|
small_down
|
2018-06-28 20:21:42 +00:00
|
|
|
small_edit
|
2021-01-02 20:48:43 +00:00
|
|
|
small_folder
|
2018-07-20 15:03:43 +00:00
|
|
|
small_library
|
2018-02-28 09:44:22 +00:00
|
|
|
small_plus
|
2021-01-02 20:48:43 +00:00
|
|
|
small_refresh
|
|
|
|
small_trash
|
2018-02-28 09:44:22 +00:00
|
|
|
small_up
|
2020-12-15 22:46:52 +00:00
|
|
|
small_warning
|
2012-07-10 12:26:26 +00:00
|
|
|
tree_nosel
|
|
|
|
tree_sel
|
2020-07-11 17:42:00 +00:00
|
|
|
visibility
|
|
|
|
visibility_off
|
2018-07-20 15:03:43 +00:00
|
|
|
www
|
2011-09-08 05:58:45 +00:00
|
|
|
)
|
|
|
|
|
2012-09-28 17:47:41 +00:00
|
|
|
|
2021-01-12 12:04:42 +00:00
|
|
|
# image basenames that go into the toolbar sized destinations, i.e. 24x24
|
2011-09-08 05:58:45 +00:00
|
|
|
set( BMAPS_MID
|
2017-06-02 09:51:11 +00:00
|
|
|
about
|
2020-09-12 20:09:40 +00:00
|
|
|
add_aligned_dimension
|
2011-09-08 05:58:45 +00:00
|
|
|
add_arc
|
2018-01-11 06:18:30 +00:00
|
|
|
add_board
|
2011-09-08 05:58:45 +00:00
|
|
|
add_bus2bus
|
|
|
|
add_bus
|
2020-09-17 00:54:58 +00:00
|
|
|
add_center_dimension
|
2011-09-08 05:58:45 +00:00
|
|
|
add_circle
|
|
|
|
add_component
|
|
|
|
add_corner
|
|
|
|
add_dashed_line
|
2018-01-11 06:18:30 +00:00
|
|
|
add_document
|
2011-09-08 05:58:45 +00:00
|
|
|
add_glabel
|
2017-10-19 21:14:01 +00:00
|
|
|
add_graphical_segments
|
|
|
|
add_graphical_polygon
|
2011-09-08 05:58:45 +00:00
|
|
|
add_hierarchical_label
|
|
|
|
add_hierar_pin
|
|
|
|
add_hierarchical_subsheet
|
|
|
|
add_junction
|
2012-07-13 18:55:29 +00:00
|
|
|
add_keepout_area
|
2020-12-24 11:39:57 +00:00
|
|
|
add_label
|
2020-09-12 20:09:40 +00:00
|
|
|
add_leader
|
2017-11-14 12:36:40 +00:00
|
|
|
add_library
|
2011-09-08 05:58:45 +00:00
|
|
|
add_line2bus
|
|
|
|
add_line_label
|
|
|
|
add_line
|
2020-09-12 20:09:40 +00:00
|
|
|
add_orthogonal_dimension
|
2017-10-31 15:38:10 +00:00
|
|
|
add_pcb_target
|
2011-09-08 05:58:45 +00:00
|
|
|
add_power
|
|
|
|
add_rectangle
|
2020-12-17 12:10:02 +00:00
|
|
|
add_symbol_to_schematic
|
2011-09-08 05:58:45 +00:00
|
|
|
add_tracks
|
2017-04-22 15:44:25 +00:00
|
|
|
add_via
|
2011-09-08 05:58:45 +00:00
|
|
|
add_zone_cutout
|
|
|
|
add_zone
|
2016-12-20 16:50:29 +00:00
|
|
|
align_items
|
2018-02-08 16:07:41 +00:00
|
|
|
align_items_left
|
|
|
|
align_items_right
|
|
|
|
align_items_top
|
|
|
|
align_items_bottom
|
2018-02-08 16:01:36 +00:00
|
|
|
align_items_center
|
|
|
|
align_items_middle
|
2011-09-08 05:58:45 +00:00
|
|
|
anchor
|
|
|
|
annotate_down_right
|
|
|
|
annotate_right_down
|
|
|
|
annotate
|
2017-02-03 20:47:01 +00:00
|
|
|
apply_pad_settings
|
2017-07-04 15:17:55 +00:00
|
|
|
array
|
2020-12-21 16:54:49 +00:00
|
|
|
auto_associate
|
2011-09-08 05:58:45 +00:00
|
|
|
auto_track_width
|
2015-12-13 16:56:47 +00:00
|
|
|
autoplace_fields
|
2011-09-08 05:58:45 +00:00
|
|
|
axis3d_back
|
|
|
|
axis3d_bottom
|
|
|
|
axis3d_front
|
|
|
|
axis3d_left
|
|
|
|
axis3d_right
|
|
|
|
axis3d_top
|
|
|
|
axis3d
|
|
|
|
break_line
|
2020-12-14 18:30:14 +00:00
|
|
|
bug
|
2019-04-02 12:31:28 +00:00
|
|
|
bus_definition_tool
|
2011-09-08 05:58:45 +00:00
|
|
|
cancel
|
2011-12-17 21:21:03 +00:00
|
|
|
change_entry_orient
|
2014-12-18 18:53:19 +00:00
|
|
|
contrast_mode
|
2018-04-30 07:52:49 +00:00
|
|
|
curved_ratsnest
|
2011-09-08 05:58:45 +00:00
|
|
|
checked_ok
|
2016-07-19 17:35:25 +00:00
|
|
|
color_materials
|
2011-09-08 05:58:45 +00:00
|
|
|
component_select_unit
|
|
|
|
config
|
2020-12-12 19:14:58 +00:00
|
|
|
convert
|
2017-06-02 09:51:11 +00:00
|
|
|
copy
|
2017-02-03 20:47:01 +00:00
|
|
|
copy_pad_settings
|
2011-09-08 05:58:45 +00:00
|
|
|
cursor_shape
|
|
|
|
cursor
|
2017-10-20 16:25:44 +00:00
|
|
|
custom_pad_to_primitives
|
2017-07-03 15:57:39 +00:00
|
|
|
cut
|
2011-09-08 05:58:45 +00:00
|
|
|
datasheet
|
|
|
|
delete_association
|
2021-03-08 02:59:07 +00:00
|
|
|
delete_cursor
|
2018-01-11 06:18:30 +00:00
|
|
|
delete_gerber
|
2011-09-08 05:58:45 +00:00
|
|
|
delete_sheet
|
|
|
|
directory
|
2018-11-01 14:11:29 +00:00
|
|
|
directory_browser
|
2020-12-08 23:30:48 +00:00
|
|
|
directory_open
|
2016-12-20 16:50:29 +00:00
|
|
|
distribute_horizontal
|
|
|
|
distribute_vertical
|
2011-09-08 05:58:45 +00:00
|
|
|
down
|
2017-06-02 09:51:11 +00:00
|
|
|
drag
|
2011-09-08 05:58:45 +00:00
|
|
|
drag_segment_withslope
|
|
|
|
drc
|
2017-07-04 15:17:55 +00:00
|
|
|
duplicate
|
2011-09-08 05:58:45 +00:00
|
|
|
edit_comp_footprint
|
|
|
|
edit_comp_ref
|
|
|
|
edit_comp_value
|
|
|
|
editor
|
2017-11-24 09:19:23 +00:00
|
|
|
edit_cmp_symb_links
|
2011-09-08 05:58:45 +00:00
|
|
|
edit
|
2020-04-25 13:20:54 +00:00
|
|
|
edge_to_copper_clearance
|
2011-09-08 05:58:45 +00:00
|
|
|
enter_sheet
|
|
|
|
ercerr
|
|
|
|
erc_green
|
|
|
|
ercwarn
|
|
|
|
erc
|
|
|
|
exit
|
2017-06-02 09:51:11 +00:00
|
|
|
exchange
|
2018-01-11 06:18:30 +00:00
|
|
|
export3d
|
2020-12-24 11:39:57 +00:00
|
|
|
export_cmp
|
2014-01-29 17:01:42 +00:00
|
|
|
export_dsn
|
|
|
|
export_idf
|
2021-03-08 02:59:07 +00:00
|
|
|
export_file
|
2011-09-08 05:58:45 +00:00
|
|
|
export_footprint_names
|
|
|
|
export_module
|
2017-11-14 14:06:27 +00:00
|
|
|
export_part
|
2020-12-22 23:12:32 +00:00
|
|
|
export_png
|
2018-01-11 06:18:30 +00:00
|
|
|
export_step
|
2020-12-22 22:16:27 +00:00
|
|
|
export_svg
|
2021-01-06 17:51:52 +00:00
|
|
|
export_to_pcbnew
|
2011-09-08 05:58:45 +00:00
|
|
|
fabrication
|
2020-12-15 22:46:36 +00:00
|
|
|
file_bom
|
|
|
|
file_drl
|
|
|
|
file_dsn
|
|
|
|
file_gbr
|
2021-01-11 21:25:26 +00:00
|
|
|
file_gerber_job
|
2020-12-15 22:46:36 +00:00
|
|
|
file_html
|
|
|
|
file_idf
|
|
|
|
file_pdf
|
|
|
|
file_pos
|
|
|
|
file_svg
|
2011-09-08 05:58:45 +00:00
|
|
|
fill_zone
|
2021-01-05 14:05:04 +00:00
|
|
|
filter
|
2011-09-08 05:58:45 +00:00
|
|
|
find
|
2011-11-17 16:32:01 +00:00
|
|
|
find_replace
|
2011-09-08 05:58:45 +00:00
|
|
|
flag
|
2016-12-13 18:36:17 +00:00
|
|
|
flip_board
|
2011-09-08 05:58:45 +00:00
|
|
|
gbr_select_mode2
|
2013-01-06 13:31:49 +00:00
|
|
|
gerbview_show_negative_objects
|
2011-09-08 05:58:45 +00:00
|
|
|
general_deletions
|
|
|
|
general_ratsnest
|
|
|
|
grid_select
|
|
|
|
grid_select_axis
|
|
|
|
grid
|
2020-12-08 17:44:47 +00:00
|
|
|
group
|
|
|
|
group_enter
|
|
|
|
group_leave
|
|
|
|
group_remove
|
2021-02-18 01:25:04 +00:00
|
|
|
group_ungroup
|
2011-09-08 05:58:45 +00:00
|
|
|
help
|
2021-01-11 22:17:37 +00:00
|
|
|
help_online
|
2011-09-08 05:58:45 +00:00
|
|
|
hidden_pin
|
2020-12-21 23:35:33 +00:00
|
|
|
hide_ratsnest
|
2011-09-08 05:58:45 +00:00
|
|
|
hierarchy_nav
|
|
|
|
hotkeys
|
2020-04-25 13:20:54 +00:00
|
|
|
hole_to_hole_clearance
|
2020-08-21 18:09:12 +00:00
|
|
|
hole_to_copper_clearance
|
2021-01-01 18:58:28 +00:00
|
|
|
icon_cvpcb_24
|
2021-01-11 21:25:26 +00:00
|
|
|
icon_footprint_browser
|
2021-01-01 18:58:28 +00:00
|
|
|
icon_gerbview_24
|
2011-09-08 05:58:45 +00:00
|
|
|
import3d
|
|
|
|
image
|
2016-03-04 18:48:08 +00:00
|
|
|
import_brd_file
|
2018-01-11 06:18:30 +00:00
|
|
|
import_document
|
2011-09-08 05:58:45 +00:00
|
|
|
import_footprint_names
|
|
|
|
import_hierarchical_label
|
|
|
|
import_module
|
2017-11-14 14:06:27 +00:00
|
|
|
import_part
|
2018-01-11 06:18:30 +00:00
|
|
|
import_project
|
2019-05-07 11:00:36 +00:00
|
|
|
import_vector
|
2011-09-08 05:58:45 +00:00
|
|
|
import
|
|
|
|
info
|
|
|
|
insert_module_board
|
|
|
|
language
|
|
|
|
layers_manager
|
|
|
|
leave_sheet
|
|
|
|
left
|
|
|
|
libedit
|
|
|
|
lib_next
|
|
|
|
lib_previous
|
2020-12-14 17:31:29 +00:00
|
|
|
library_browser
|
2017-08-11 09:01:28 +00:00
|
|
|
library_archive
|
|
|
|
library_archive_as
|
2011-09-08 05:58:45 +00:00
|
|
|
library
|
2012-12-10 11:18:42 +00:00
|
|
|
library_table
|
2011-09-08 05:58:45 +00:00
|
|
|
lines90
|
2015-05-09 08:37:50 +00:00
|
|
|
list_nets
|
2020-12-17 12:10:02 +00:00
|
|
|
load_drill
|
2018-01-11 06:18:30 +00:00
|
|
|
load_gerber
|
2011-09-08 05:58:45 +00:00
|
|
|
load_module_board
|
2018-05-22 12:36:20 +00:00
|
|
|
lock_unlock
|
2011-09-08 05:58:45 +00:00
|
|
|
locked
|
2017-03-09 09:09:13 +00:00
|
|
|
measurement
|
2017-10-31 15:38:10 +00:00
|
|
|
pcb_target
|
2011-09-08 05:58:45 +00:00
|
|
|
mirror_h
|
|
|
|
mirror_v
|
|
|
|
mode_module
|
2013-03-01 19:59:29 +00:00
|
|
|
module_editor
|
2012-05-09 17:37:25 +00:00
|
|
|
module_wizard
|
2011-09-08 05:58:45 +00:00
|
|
|
module_filtered_list
|
|
|
|
module_options
|
2012-03-15 18:20:22 +00:00
|
|
|
module_pin_filtered_list
|
2013-05-31 17:33:46 +00:00
|
|
|
module_library_list
|
2011-09-08 05:58:45 +00:00
|
|
|
module
|
|
|
|
morgan1
|
|
|
|
morgan2
|
2017-07-04 15:17:55 +00:00
|
|
|
move_exactly
|
2011-09-08 05:58:45 +00:00
|
|
|
move
|
2017-07-04 15:17:55 +00:00
|
|
|
move_relative
|
2011-09-08 05:58:45 +00:00
|
|
|
mw_add_gap
|
|
|
|
mw_add_line
|
2020-10-19 21:28:27 +00:00
|
|
|
mw_add_shape
|
2011-09-08 05:58:45 +00:00
|
|
|
mw_add_stub_arc
|
|
|
|
mw_add_stub
|
|
|
|
net_highlight
|
2016-11-16 12:09:34 +00:00
|
|
|
net_highlight_schematic
|
2011-09-08 05:58:45 +00:00
|
|
|
netlist
|
|
|
|
new_component
|
|
|
|
new_footprint
|
2017-06-02 09:51:11 +00:00
|
|
|
new_generic
|
2021-01-27 19:43:18 +00:00
|
|
|
new_library
|
2011-09-08 05:58:45 +00:00
|
|
|
new_project
|
|
|
|
noconn
|
|
|
|
normal
|
|
|
|
open_project
|
2016-07-19 17:35:25 +00:00
|
|
|
options_3drender
|
2018-07-24 10:57:07 +00:00
|
|
|
options_board
|
2018-05-02 19:42:41 +00:00
|
|
|
options_generic
|
2011-09-08 05:58:45 +00:00
|
|
|
options_pad
|
2020-04-23 11:24:40 +00:00
|
|
|
options_schematic
|
2011-09-08 05:58:45 +00:00
|
|
|
opt_show_polygon
|
|
|
|
ortho
|
|
|
|
pad_sketch
|
|
|
|
pad
|
2015-04-03 19:10:09 +00:00
|
|
|
pad_enumerate
|
2020-05-23 17:14:49 +00:00
|
|
|
pad_number
|
2011-09-08 05:58:45 +00:00
|
|
|
pads_mask_layers
|
2020-07-27 19:41:50 +00:00
|
|
|
pads_remove
|
2017-06-02 09:51:11 +00:00
|
|
|
path
|
2013-07-19 18:27:22 +00:00
|
|
|
pagelayout_normal_view_mode
|
|
|
|
pagelayout_special_view_mode
|
2011-09-08 05:58:45 +00:00
|
|
|
part_properties
|
|
|
|
paste
|
|
|
|
pin2pin
|
|
|
|
pin_size_to
|
2016-11-04 12:59:45 +00:00
|
|
|
pin_show_etype
|
2015-03-27 10:26:07 +00:00
|
|
|
pin_table
|
2011-09-08 05:58:45 +00:00
|
|
|
pin
|
2012-08-29 12:40:09 +00:00
|
|
|
plot
|
2011-09-08 05:58:45 +00:00
|
|
|
polar_coord
|
2020-12-15 22:46:36 +00:00
|
|
|
post_bom
|
2011-09-08 05:58:45 +00:00
|
|
|
post_compo
|
2020-12-15 22:46:36 +00:00
|
|
|
post_d356
|
2011-09-08 05:58:45 +00:00
|
|
|
post_drill
|
2020-12-15 22:46:36 +00:00
|
|
|
post_gencad
|
2020-12-14 23:31:51 +00:00
|
|
|
post_gerber
|
2020-12-15 22:46:36 +00:00
|
|
|
post_rpt
|
2011-09-08 05:58:45 +00:00
|
|
|
preference
|
|
|
|
print_button
|
2020-12-07 21:17:06 +00:00
|
|
|
project
|
2021-01-03 14:31:43 +00:00
|
|
|
project_close
|
2020-12-07 21:17:06 +00:00
|
|
|
project_kicad
|
2015-03-15 14:22:37 +00:00
|
|
|
ps_diff_pair
|
|
|
|
ps_diff_pair_gap
|
|
|
|
ps_diff_pair_tune_length
|
|
|
|
ps_diff_pair_tune_phase
|
|
|
|
ps_tune_length
|
2017-02-03 20:47:01 +00:00
|
|
|
push_pad_settings
|
2021-01-11 21:25:26 +00:00
|
|
|
puzzle_piece
|
2014-02-11 18:32:09 +00:00
|
|
|
py_script
|
2017-06-02 09:51:11 +00:00
|
|
|
recent
|
2011-09-08 05:58:45 +00:00
|
|
|
redo
|
2021-01-02 20:48:43 +00:00
|
|
|
refresh
|
2011-09-08 05:58:45 +00:00
|
|
|
reload
|
2016-07-19 17:35:25 +00:00
|
|
|
render_mode
|
2017-06-02 09:51:11 +00:00
|
|
|
rescue
|
2011-09-08 05:58:45 +00:00
|
|
|
right
|
2017-12-14 13:33:20 +00:00
|
|
|
router_len_tuner
|
|
|
|
router_len_tuner_setup
|
|
|
|
router_len_tuner_amplitude_decr
|
|
|
|
router_len_tuner_amplitude_incr
|
|
|
|
router_len_tuner_dist_decr
|
|
|
|
router_len_tuner_dist_incr
|
2011-09-08 05:58:45 +00:00
|
|
|
rotate_ccw
|
|
|
|
rotate_cw
|
2020-12-14 20:21:36 +00:00
|
|
|
rotate_ccw_x
|
|
|
|
rotate_cw_x
|
|
|
|
rotate_ccw_y
|
|
|
|
rotate_cw_y
|
|
|
|
rotate_ccw_z
|
|
|
|
rotate_cw_z
|
2011-09-08 05:58:45 +00:00
|
|
|
save_as
|
|
|
|
save
|
|
|
|
select_layer_pair
|
|
|
|
select_w_layer
|
2017-07-24 19:58:55 +00:00
|
|
|
select_same_sheet
|
2011-09-08 05:58:45 +00:00
|
|
|
shape_3d
|
2020-05-22 20:40:53 +00:00
|
|
|
shape_3d_back
|
2011-09-08 05:58:45 +00:00
|
|
|
sheetset
|
2016-08-29 09:39:54 +00:00
|
|
|
simulator
|
2016-08-11 12:42:00 +00:00
|
|
|
sim_run
|
|
|
|
sim_stop
|
|
|
|
sim_tune
|
|
|
|
sim_probe
|
|
|
|
sim_add_signal
|
2017-10-31 11:09:49 +00:00
|
|
|
search_tree
|
2021-01-05 22:16:51 +00:00
|
|
|
set_origin
|
2011-09-08 05:58:45 +00:00
|
|
|
show_dcodenumber
|
|
|
|
show_footprint
|
|
|
|
show_mod_edge
|
2020-12-21 23:35:33 +00:00
|
|
|
show_ratsnest
|
2011-09-08 05:58:45 +00:00
|
|
|
showtrack
|
|
|
|
show_zone
|
|
|
|
show_zone_disable
|
|
|
|
show_zone_outline_only
|
2016-09-25 11:08:04 +00:00
|
|
|
show_all_layers
|
|
|
|
show_no_layers
|
|
|
|
show_no_copper_layers
|
|
|
|
show_all_copper_layers
|
2020-04-19 22:56:30 +00:00
|
|
|
show_all_front_layers
|
|
|
|
show_all_back_layers
|
2021-01-06 21:49:00 +00:00
|
|
|
show_front_assembly_layers
|
|
|
|
show_back_assembly_layers
|
2020-12-24 18:58:49 +00:00
|
|
|
special_tools
|
2017-04-02 12:09:01 +00:00
|
|
|
spreadsheet
|
2011-09-08 05:58:45 +00:00
|
|
|
swap_layer
|
2020-04-12 08:29:28 +00:00
|
|
|
switch_corner_rounding_shape
|
2017-06-02 09:51:11 +00:00
|
|
|
text
|
2011-09-08 05:58:45 +00:00
|
|
|
text_sketch
|
|
|
|
three_d
|
|
|
|
tool_ratsnest
|
|
|
|
tools
|
2021-01-02 20:48:43 +00:00
|
|
|
trash
|
2011-09-08 05:58:45 +00:00
|
|
|
undo
|
|
|
|
unit_inch
|
2020-10-03 23:34:23 +00:00
|
|
|
unit_mil
|
2011-09-08 05:58:45 +00:00
|
|
|
unit_mm
|
|
|
|
unknown
|
|
|
|
unlocked
|
|
|
|
unzip
|
|
|
|
up
|
2018-07-25 22:44:57 +00:00
|
|
|
update_pcb_from_sch
|
2020-05-24 11:13:22 +00:00
|
|
|
update_sch_from_pcb
|
2011-12-17 21:21:03 +00:00
|
|
|
via
|
2020-05-11 19:39:30 +00:00
|
|
|
via_annulus
|
2015-05-03 18:43:07 +00:00
|
|
|
via_buried
|
|
|
|
via_microvia
|
2011-09-08 05:58:45 +00:00
|
|
|
via_sketch
|
2020-04-25 13:20:54 +00:00
|
|
|
via_diameter
|
|
|
|
via_hole_diameter
|
2011-09-08 05:58:45 +00:00
|
|
|
width_track_via
|
|
|
|
width_track
|
|
|
|
zip
|
2012-06-20 09:57:36 +00:00
|
|
|
zone_duplicate
|
2020-08-30 14:18:35 +00:00
|
|
|
zone_fillet
|
2012-02-25 19:55:40 +00:00
|
|
|
zone_unfill
|
2011-09-08 05:58:45 +00:00
|
|
|
zoom_area
|
2020-05-23 17:14:49 +00:00
|
|
|
zoom_auto_fit_in_page
|
2011-09-08 05:58:45 +00:00
|
|
|
zoom_fit_in_page
|
2020-09-11 07:51:00 +00:00
|
|
|
zoom_fit_to_objects
|
2011-09-08 05:58:45 +00:00
|
|
|
zoom_center_on_screen
|
|
|
|
zoom_in
|
|
|
|
zoom_out
|
|
|
|
zoom_selection
|
|
|
|
)
|
|
|
|
|
2021-01-01 18:58:28 +00:00
|
|
|
# 24 x 24 for internal icons
|
|
|
|
set( BMAPS_24
|
|
|
|
icon_bitmap2component_24
|
|
|
|
icon_eeschema_24
|
|
|
|
icon_gerbview_24
|
2021-02-01 19:26:53 +00:00
|
|
|
icon_libedit_24
|
|
|
|
icon_modedit_24
|
2021-01-01 18:58:28 +00:00
|
|
|
icon_pagelayout_editor_24
|
|
|
|
icon_pcbcalculator_24
|
|
|
|
icon_pcbnew_24
|
|
|
|
)
|
|
|
|
|
2020-12-22 01:17:13 +00:00
|
|
|
# 32 x 32 for icon sets
|
|
|
|
set( BMAPS_32
|
|
|
|
icon_bitmap2component_32
|
|
|
|
icon_eeschema_32
|
|
|
|
icon_gerbview_32
|
|
|
|
icon_kicad_32
|
|
|
|
icon_libedit_32
|
|
|
|
icon_modedit_32
|
2020-12-22 19:40:48 +00:00
|
|
|
icon_pagelayout_editor_32
|
|
|
|
icon_pcbcalculator_32
|
2020-12-22 01:17:13 +00:00
|
|
|
icon_pcbnew_32
|
|
|
|
)
|
2011-09-08 05:58:45 +00:00
|
|
|
|
|
|
|
# 48 x 48 for now
|
|
|
|
set( BMAPS_BIG
|
2012-03-09 18:58:58 +00:00
|
|
|
dialog_warning
|
2011-09-08 05:58:45 +00:00
|
|
|
icon_3d
|
|
|
|
icon_cvpcb
|
|
|
|
icon_eeschema
|
|
|
|
icon_gerbview
|
|
|
|
icon_kicad
|
2016-09-20 11:22:42 +00:00
|
|
|
icon_libedit
|
2011-09-08 05:58:45 +00:00
|
|
|
icon_modedit
|
|
|
|
icon_pcbnew
|
2011-09-08 20:27:02 +00:00
|
|
|
icon_bitmap2component
|
2020-12-22 23:15:39 +00:00
|
|
|
icon_pagelayout_editor
|
2011-09-08 20:27:02 +00:00
|
|
|
icon_pcbcalculator
|
2020-04-21 01:44:17 +00:00
|
|
|
reannotate_down_left
|
|
|
|
reannotate_down_right
|
|
|
|
reannotate_left_down
|
|
|
|
reannotate_left_up
|
|
|
|
reannotate_right_down
|
|
|
|
reannotate_right_up
|
|
|
|
reannotate_up_left
|
|
|
|
reannotate_up_right
|
2013-07-19 18:27:22 +00:00
|
|
|
icon_pagelayout_editor
|
2014-12-11 12:00:59 +00:00
|
|
|
wizard_add_fplib_icon
|
2011-09-08 05:58:45 +00:00
|
|
|
)
|
|
|
|
|
2020-12-22 23:15:39 +00:00
|
|
|
# 64 x 64 for icon sets
|
|
|
|
set( BMAPS_64
|
|
|
|
icon_cvpcb
|
|
|
|
icon_eeschema
|
|
|
|
icon_gerbview
|
|
|
|
icon_kicad
|
|
|
|
icon_libedit
|
|
|
|
icon_modedit
|
|
|
|
icon_pcbnew
|
|
|
|
icon_pagelayout_editor
|
|
|
|
icon_bitmap2component
|
|
|
|
icon_pcbcalculator
|
|
|
|
)
|
|
|
|
|
2021-01-01 18:58:28 +00:00
|
|
|
# 128 x 128 for icon sets
|
2020-12-22 23:15:39 +00:00
|
|
|
set( BMAPS_128
|
|
|
|
icon_cvpcb
|
|
|
|
icon_eeschema
|
|
|
|
icon_gerbview
|
|
|
|
icon_kicad
|
|
|
|
icon_libedit
|
|
|
|
icon_modedit
|
|
|
|
icon_pcbnew
|
|
|
|
icon_pagelayout_editor
|
|
|
|
icon_bitmap2component
|
|
|
|
icon_pcbcalculator
|
|
|
|
)
|
|
|
|
|
2021-04-25 15:37:34 +00:00
|
|
|
# Images in this section are generated at whatever resolution is set in the source SVG file
|
|
|
|
# Use Inkscape Document Properties > Custom Size to set (make sure units are pixels)
|
|
|
|
# These are used for images in the UI that are not-square or very large (infographics, etc)
|
2015-02-17 23:50:28 +00:00
|
|
|
set( BMAPS_OTHER
|
2021-05-04 02:27:54 +00:00
|
|
|
att_bridge
|
|
|
|
att_pi
|
|
|
|
att_splitter
|
|
|
|
att_tee
|
|
|
|
c_microstrip
|
|
|
|
coax
|
|
|
|
color_code_multiplier
|
|
|
|
color_code_tolerance
|
|
|
|
color_code_value
|
|
|
|
color_code_value_and_name
|
|
|
|
cpw
|
|
|
|
cpw_back
|
|
|
|
microstrip
|
|
|
|
microstrip_zodd_zeven
|
2020-09-08 23:39:33 +00:00
|
|
|
pads_npth
|
|
|
|
pads_npth_bottom
|
2021-05-04 02:27:54 +00:00
|
|
|
pads_npth_top
|
|
|
|
pads_npth_top_bottom
|
2020-07-27 19:41:50 +00:00
|
|
|
pads_remove_unused
|
|
|
|
pads_remove_unused_keep_bottom
|
|
|
|
pads_reset_unused
|
2021-05-04 02:27:54 +00:00
|
|
|
rectwaveguide
|
|
|
|
regul
|
|
|
|
regul_3pins
|
|
|
|
stripline
|
2019-12-31 04:05:51 +00:00
|
|
|
stroke_dash
|
|
|
|
stroke_dashdot
|
|
|
|
stroke_dot
|
|
|
|
stroke_solid
|
2015-02-17 23:50:28 +00:00
|
|
|
tune_diff_pair_length_legend
|
|
|
|
tune_diff_pair_skew_legend
|
|
|
|
tune_single_track_length_legend
|
2021-05-04 02:27:54 +00:00
|
|
|
twistedpair
|
|
|
|
viacalc
|
2015-02-17 23:50:28 +00:00
|
|
|
)
|
|
|
|
|
2011-09-08 05:58:45 +00:00
|
|
|
|
|
|
|
# @todo keep these in sync with .bzrignore
|
2016-09-21 15:52:41 +00:00
|
|
|
set( TMP_DIR "${CMAKE_CURRENT_BINARY_DIR}/tmp" )
|
2011-09-08 05:58:45 +00:00
|
|
|
|
2016-09-21 17:50:58 +00:00
|
|
|
# true to generate log files, false to build icon files only
|
|
|
|
# generate logs is useful only if you have problems
|
2021-03-08 02:59:07 +00:00
|
|
|
set( CREATE_LOG_FILES true )
|
|
|
|
|
|
|
|
set( BITMAP_INFO_FILE "${CMAKE_SOURCE_DIR}/include/bitmaps/bitmap_info.h" )
|
2021-03-11 01:48:37 +00:00
|
|
|
set( BITMAP_INFO_TEMPLATE "${CMAKE_SOURCE_DIR}/include/bitmaps/bitmap_info.h.in" )
|
|
|
|
set( BITMAP_INFO_LIST "" )
|
2016-09-21 17:50:58 +00:00
|
|
|
|
2021-03-08 02:59:07 +00:00
|
|
|
set( ALL_PNGS "" )
|
2016-09-21 17:50:58 +00:00
|
|
|
|
2011-09-08 05:58:45 +00:00
|
|
|
function( svg2png inputFile outFile pngWidth pngHeight )
|
|
|
|
#message( "svg2png( inputFile: ${inputFile} outFile: ${outFile} pngWidth: ${pngWidth} pngHeight: ${pngHeight})")
|
|
|
|
|
2016-09-21 17:50:58 +00:00
|
|
|
if( CREATE_LOG_FILES )
|
|
|
|
set( logfile "${TMP_DIR}/${bmn}.inkscape.log" )
|
|
|
|
else()
|
|
|
|
set( logfile "null" )
|
|
|
|
endif()
|
|
|
|
|
2021-03-11 22:16:35 +00:00
|
|
|
if( ${pngWidth} EQUAL -1 )
|
|
|
|
set( sizeArgs --export-area-page )
|
|
|
|
else()
|
|
|
|
set( sizeArgs -w ${pngWidth} -h ${pngHeight} )
|
|
|
|
endif()
|
|
|
|
|
2011-09-08 05:58:45 +00:00
|
|
|
add_custom_command(
|
|
|
|
OUTPUT ${outFile}
|
2020-09-02 18:11:47 +00:00
|
|
|
# this Inkscape command line is for old Inkscape version < 1.0
|
2020-12-15 22:46:52 +00:00
|
|
|
# COMMAND ${Inkscape_EXECUTABLE} --without-gui --export-area-snap -f ${inputFile} --export-png ${outFile} -w ${pngWidth} -h ${pngHeight} > ${logfile}
|
2020-09-02 18:11:47 +00:00
|
|
|
|
|
|
|
# this Inkscape command line is for Inkscape >= 1.0
|
2021-03-11 22:16:35 +00:00
|
|
|
COMMAND ${Inkscape_EXECUTABLE} --export-area-snap --export-type=png ${inputFile}
|
|
|
|
--export-filename ${outFile} ${sizeArgs} > ${logfile}
|
2020-09-02 18:11:47 +00:00
|
|
|
|
2011-09-08 05:58:45 +00:00
|
|
|
DEPENDS ${inputFile}
|
|
|
|
COMMENT "Creating ${pngHeight} pixel tall ${outFile}"
|
2021-03-11 22:16:35 +00:00
|
|
|
VERBATIM
|
2011-09-08 05:58:45 +00:00
|
|
|
)
|
|
|
|
endfunction()
|
|
|
|
|
|
|
|
|
|
|
|
# Function png2png
|
2011-09-13 19:37:25 +00:00
|
|
|
# converts a basic PNG to one
|
|
|
|
function( png2png inputFile outFile )
|
2011-09-08 05:58:45 +00:00
|
|
|
|
2016-09-21 17:50:58 +00:00
|
|
|
if( CREATE_LOG_FILES )
|
|
|
|
set( logfile "${TMP_DIR}/${bmn}.pngcrush.log" )
|
|
|
|
else()
|
|
|
|
set( logfile "null" )
|
|
|
|
endif()
|
|
|
|
|
2011-09-08 05:58:45 +00:00
|
|
|
add_custom_command(
|
|
|
|
OUTPUT ${outFile}
|
|
|
|
|
2016-09-21 15:52:41 +00:00
|
|
|
# pngcrush all icons without background to remove any extraneous text records.
|
2016-09-21 17:50:58 +00:00
|
|
|
COMMAND ${pngcrush_EXECUTABLE} -rem alla ${inputFile} ${outFile} > ${logfile}
|
2011-09-08 05:58:45 +00:00
|
|
|
|
2011-09-13 19:37:25 +00:00
|
|
|
DEPENDS ${inputFile}
|
2011-09-08 05:58:45 +00:00
|
|
|
|
2016-09-21 17:50:58 +00:00
|
|
|
COMMENT "Creating cleaned file ${outFile}"
|
2011-09-08 05:58:45 +00:00
|
|
|
)
|
|
|
|
endfunction()
|
|
|
|
|
|
|
|
# Function png2cpp
|
|
|
|
# converts a single *.png to *.cpp
|
2012-09-28 17:47:41 +00:00
|
|
|
function( png2cpp inputFile outFile )
|
|
|
|
add_custom_command(
|
|
|
|
OUTPUT ${outFile}
|
|
|
|
|
|
|
|
COMMAND ${CMAKE_COMMAND} -DinputFile=${inputFile} -DoutCppFile=${outFile}
|
2021-01-27 21:49:34 +00:00
|
|
|
-P ${CMAKE_MODULE_PATH}/BuildSteps/PNG2cpp.cmake
|
2012-09-28 17:47:41 +00:00
|
|
|
|
2021-01-27 21:49:34 +00:00
|
|
|
DEPENDS ${inputFile} ${CMAKE_MODULE_PATH}/BuildSteps/PNG2cpp.cmake
|
2011-09-08 05:58:45 +00:00
|
|
|
COMMENT "Creating ${outFile}"
|
|
|
|
)
|
|
|
|
endfunction()
|
|
|
|
|
|
|
|
|
|
|
|
# Function bitmap_dir
|
2021-03-11 22:16:35 +00:00
|
|
|
# Creates build targets for all the source SVGs in the given list, output at the given resolution
|
|
|
|
# Will create targets for each theme in the THEMES list.
|
|
|
|
# A height of -1 means to export with the page area rather than scaling to a given resolution.
|
|
|
|
# This is used for the BMAPS_OTHER list which have varying output sizes.
|
2021-03-11 01:48:37 +00:00
|
|
|
function( bitmap_dir pngWidth pngHeight bmapList )
|
2011-09-08 05:58:45 +00:00
|
|
|
|
2021-03-08 02:59:07 +00:00
|
|
|
set( pngDir "${CMAKE_CURRENT_SOURCE_DIR}/png" )
|
2011-09-08 05:58:45 +00:00
|
|
|
|
2021-03-08 02:59:07 +00:00
|
|
|
file( MAKE_DIRECTORY ${pngDir} )
|
2011-09-08 05:58:45 +00:00
|
|
|
|
|
|
|
#file( REMOVE_RECURSE ${TMP_DIR} )
|
|
|
|
file( MAKE_DIRECTORY ${TMP_DIR} )
|
|
|
|
|
2021-03-08 02:59:07 +00:00
|
|
|
foreach( theme ${THEMES} )
|
|
|
|
if( NOT ${theme} STREQUAL "light" )
|
|
|
|
set( themeTag "_${theme}" )
|
|
|
|
else()
|
|
|
|
set( themeTag "" )
|
|
|
|
endif()
|
2011-09-08 05:58:45 +00:00
|
|
|
|
2021-03-11 22:16:35 +00:00
|
|
|
if( ${pngHeight} EQUAL -1 )
|
|
|
|
set( heightTag "" )
|
|
|
|
else()
|
|
|
|
set( heightTag "_${pngHeight}" )
|
|
|
|
endif()
|
|
|
|
|
2021-03-08 02:59:07 +00:00
|
|
|
foreach( bmn ${bmapList} )
|
2011-09-08 05:58:45 +00:00
|
|
|
|
2021-03-08 02:59:07 +00:00
|
|
|
set( svgFile "${CMAKE_CURRENT_SOURCE_DIR}/sources/${theme}/${bmn}.svg" )
|
2021-03-11 22:16:35 +00:00
|
|
|
set( pngFile "${bmn}${themeTag}${heightTag}.png" )
|
2021-03-08 02:59:07 +00:00
|
|
|
set( pngPath "${pngDir}/${pngFile}" )
|
|
|
|
set( tmpFile "${TMP_DIR}/${pngFile}" )
|
2011-09-08 05:58:45 +00:00
|
|
|
|
2021-03-08 02:59:07 +00:00
|
|
|
if( NOT EXISTS ${svgFile} )
|
2021-03-11 01:48:37 +00:00
|
|
|
message( "Warning: Source SVG ${svgFile} does not exist!" )
|
2021-03-08 02:59:07 +00:00
|
|
|
continue()
|
|
|
|
endif()
|
2011-09-08 05:58:45 +00:00
|
|
|
|
2021-03-08 02:59:07 +00:00
|
|
|
#svg2png( inputFile outFile pngWidth pngHeight )
|
|
|
|
svg2png( ${svgFile} ${tmpFile} ${pngWidth} ${pngHeight} )
|
|
|
|
|
|
|
|
#png2png( inputFile outFile )
|
|
|
|
png2png( ${tmpFile} ${pngPath} )
|
|
|
|
|
2021-03-11 01:48:37 +00:00
|
|
|
set( bitmapInfo
|
|
|
|
" { BITMAPS::${bmn}, wxT( \"${pngFile}\" ), ${pngHeight}, wxT( \"${theme}\" ) },\n"
|
|
|
|
)
|
|
|
|
|
|
|
|
set( BITMAP_INFO_LIST "${BITMAP_INFO_LIST}${bitmapInfo}" )
|
2021-03-08 02:59:07 +00:00
|
|
|
list( APPEND ALL_PNGS ${pngPath} )
|
|
|
|
endforeach()
|
2011-09-08 05:58:45 +00:00
|
|
|
endforeach()
|
|
|
|
|
2021-03-08 02:59:07 +00:00
|
|
|
set( ALL_PNGS ${ALL_PNGS} PARENT_SCOPE )
|
2021-03-11 01:48:37 +00:00
|
|
|
set( BITMAP_INFO_LIST ${BITMAP_INFO_LIST} PARENT_SCOPE )
|
2021-03-08 02:59:07 +00:00
|
|
|
|
2011-09-08 05:58:45 +00:00
|
|
|
endfunction()
|
|
|
|
|
|
|
|
|
2021-03-08 02:59:07 +00:00
|
|
|
include( FindUnixCommands )
|
|
|
|
|
2021-03-16 23:31:56 +00:00
|
|
|
# CMake on Windows CI seems to struggle to find tar even though it's in PATH
|
|
|
|
# Let's help it out as modern windows (Server 2019 and 10 provide tar)
|
|
|
|
if( MSVC AND TAR STREQUAL "TAR-NOTFOUND" )
|
|
|
|
# yolo
|
|
|
|
set( TAR "C:\\Windows\\System32\\tar.exe" )
|
|
|
|
endif()
|
|
|
|
|
2021-03-08 02:59:07 +00:00
|
|
|
set( BITMAP_ARCHIVE_PATH ${CMAKE_BINARY_DIR}/resources/images.tar.gz )
|
|
|
|
|
|
|
|
if( NOT ALL_PNGS )
|
|
|
|
file( GLOB_RECURSE ALL_PNGS ${CMAKE_CURRENT_SOURCE_DIR}/png/*.png )
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if( MINGW )
|
|
|
|
# This seems like a huge hack, but I can't find a better way. If anyone else does, please
|
|
|
|
# feel free to replace this with it...
|
|
|
|
file( TO_CMAKE_PATH "${BITMAP_ARCHIVE_PATH}" TAR_OUTPUT_FILE )
|
|
|
|
string( REGEX REPLACE "^([a-zA-Z]):/" "/\\1/" TAR_OUTPUT_FILE "${TAR_OUTPUT_FILE}" )
|
|
|
|
else()
|
|
|
|
set( TAR_OUTPUT_FILE "${BITMAP_ARCHIVE_PATH}" )
|
|
|
|
endif()
|
|
|
|
|
|
|
|
add_custom_target( bitmap_archive ALL
|
|
|
|
COMMAND ${TAR} cfz "${TAR_OUTPUT_FILE}" .
|
|
|
|
DEPENDS ${ALL_PNGS}
|
|
|
|
BYPRODUCTS ${BITMAP_ARCHIVE_PATH}
|
|
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/png
|
|
|
|
COMMENT "Creating image archive ${TAR_OUTPUT_FILE}"
|
|
|
|
VERBATIM
|
|
|
|
)
|
|
|
|
|
|
|
|
install( FILES ${BITMAP_ARCHIVE_PATH}
|
|
|
|
DESTINATION ${KICAD_DATA}/resources
|
|
|
|
)
|
|
|
|
|
2011-09-08 05:58:45 +00:00
|
|
|
if( MAINTAIN_PNGS )
|
|
|
|
|
2011-09-08 20:27:02 +00:00
|
|
|
# Inkscape is required to convert SVG files to PNG files.
|
|
|
|
set( Inkscape_FOUND FALSE )
|
|
|
|
|
|
|
|
if( NOT Inkscape_FOUND )
|
|
|
|
find_program( Inkscape_EXECUTABLE inkscape
|
|
|
|
PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Inkscape;InstallDir]"
|
|
|
|
DOC "Inkscape vector drawing program." )
|
|
|
|
|
|
|
|
if( NOT Inkscape_EXECUTABLE )
|
|
|
|
message( FATAL_ERROR "Could not find the Inkscape vector drawing program." )
|
|
|
|
else( NOT Inkscape_EXECUTABLE )
|
|
|
|
set( Inkscape_FOUND TRUE )
|
|
|
|
set( Inkscape_EXECUTABLE ${Inkscape_EXECUTABLE}
|
|
|
|
CACHE FILEPATH "Path and file name of the Inkscape program." )
|
|
|
|
message( STATUS "The Inkscape vector drawing program found." )
|
|
|
|
endif( NOT Inkscape_EXECUTABLE )
|
|
|
|
endif( NOT Inkscape_FOUND )
|
|
|
|
|
|
|
|
# pngcrush is required to reduce the size of the converted PNG files.
|
|
|
|
set( pngcrush_FOUND FALSE )
|
|
|
|
|
|
|
|
if( NOT pngcrush_FOUND )
|
|
|
|
find_program( pngcrush_EXECUTABLE pngcrush DOC "The PNG size reduction program." )
|
|
|
|
|
|
|
|
if( NOT pngcrush_EXECUTABLE )
|
|
|
|
message( FATAL_ERROR "Could not find the pngcrush PNG size reduction program." )
|
|
|
|
else( NOT pngcrush_EXECUTABLE )
|
|
|
|
set( pngcrush_FOUND TRUE )
|
|
|
|
set( pngcrush_EXECUTABLE ${pngcrush_EXECUTABLE}
|
|
|
|
CACHE FILEPATH "Path and file name of the pngcrush program." )
|
|
|
|
message( STATUS "The pngcrush PNG size reduction program found." )
|
|
|
|
endif( NOT pngcrush_EXECUTABLE )
|
|
|
|
endif( NOT pngcrush_FOUND )
|
|
|
|
|
2011-10-18 19:18:04 +00:00
|
|
|
# these 3 cmake commands for each desired bitmap size set, repeat as needed:
|
2021-03-11 01:48:37 +00:00
|
|
|
bitmap_dir( 16 16 "${BMAPS_SMALL}" )
|
2011-10-18 19:18:04 +00:00
|
|
|
|
2021-03-11 01:48:37 +00:00
|
|
|
bitmap_dir( 24 24 "${BMAPS_MID}" )
|
2011-09-08 05:58:45 +00:00
|
|
|
|
2021-03-11 01:48:37 +00:00
|
|
|
bitmap_dir( 32 32 "${BMAPS_32}" )
|
2020-12-22 01:17:13 +00:00
|
|
|
|
2021-03-11 01:48:37 +00:00
|
|
|
bitmap_dir( 22 22 "${BMAPS_22}" )
|
2020-12-22 23:15:39 +00:00
|
|
|
|
2021-03-11 01:48:37 +00:00
|
|
|
bitmap_dir( 24 24 "${BMAPS_24}" )
|
2020-12-22 23:15:39 +00:00
|
|
|
|
2021-03-11 01:48:37 +00:00
|
|
|
bitmap_dir( 64 64 "${BMAPS_64}" )
|
2020-12-22 23:15:39 +00:00
|
|
|
|
2021-03-11 01:48:37 +00:00
|
|
|
bitmap_dir( 128 128 "${BMAPS_128}" )
|
2020-12-22 23:15:39 +00:00
|
|
|
|
2021-03-11 01:48:37 +00:00
|
|
|
bitmap_dir( 48 48 "${BMAPS_BIG}" )
|
2011-09-08 05:58:45 +00:00
|
|
|
|
2021-03-11 22:16:35 +00:00
|
|
|
bitmap_dir( -1 -1 "${BMAPS_OTHER}" )
|
|
|
|
|
2021-03-11 01:48:37 +00:00
|
|
|
configure_file( ${BITMAP_INFO_TEMPLATE} ${BITMAP_INFO_FILE} NEWLINE_STYLE UNIX )
|
2012-09-28 17:47:41 +00:00
|
|
|
|
2021-03-08 02:59:07 +00:00
|
|
|
add_custom_target( generate_pngs ALL
|
|
|
|
DEPENDS ${ALL_PNGS}
|
|
|
|
COMMENT "Creating PNGs from SVGs"
|
|
|
|
)
|
|
|
|
|
2021-03-11 01:48:37 +00:00
|
|
|
add_dependencies( bitmap_archive generate_pngs )
|
2021-03-08 02:59:07 +00:00
|
|
|
|
|
|
|
endif( MAINTAIN_PNGS )
|