bitmap_info.h: move g_BitmapInfo initialization to bitmap_info.cpp.

The main purpose is to make changes in g_BitmapInfo more easy.
Although it is automatically generated, it is sometime more easy to modify
it by hand (the recreation of bitmaps stuff is time consumming), especially
during testing.
This commit is contained in:
jean-pierre charras 2022-06-30 13:00:37 +02:00
parent 9b0531db54
commit 1598ce762b
5 changed files with 1132 additions and 1124 deletions

View File

@ -656,8 +656,9 @@ set( TMP_DIR "${CMAKE_CURRENT_BINARY_DIR}/tmp" )
# generate logs is useful only if you have problems # generate logs is useful only if you have problems
set( CREATE_LOG_FILES false ) set( CREATE_LOG_FILES false )
set( BITMAP_INFO_FILE "${CMAKE_SOURCE_DIR}/include/bitmaps/bitmap_info.h" ) #set( BITMAP_INFO_FILE "${CMAKE_SOURCE_DIR}/include/bitmaps/bitmap_info.h" )
set( BITMAP_INFO_TEMPLATE "${CMAKE_SOURCE_DIR}/include/bitmaps/bitmap_info.h.in" ) set( BITMAP_INFO_FILE "${CMAKE_SOURCE_DIR}/common/bitmap_info.cpp" )
set( BITMAP_INFO_TEMPLATE "${CMAKE_SOURCE_DIR}/include/bitmaps/bitmap_info.cpp.in" )
set( BITMAP_INFO_LIST "" ) set( BITMAP_INFO_LIST "" )
set( ALL_PNGS "" ) set( ALL_PNGS "" )

View File

@ -284,6 +284,7 @@ set( COMMON_SRCS
bin_mod.cpp bin_mod.cpp
bitmap.cpp bitmap.cpp
bitmap_base.cpp bitmap_base.cpp
bitmap_info.cpp
bitmap_store.cpp bitmap_store.cpp
board_printout.cpp board_printout.cpp
build_version.cpp build_version.cpp
@ -443,7 +444,7 @@ set( COMMON_SRCS
add_library( common STATIC add_library( common STATIC
${COMMON_SRCS} ${COMMON_SRCS}
) )
add_dependencies( common version_header ) add_dependencies( common version_header )
add_dependencies( common compoundfilereader ) # used by altium_parser.cpp add_dependencies( common compoundfilereader ) # used by altium_parser.cpp
@ -574,7 +575,7 @@ add_library( pcbcommon STATIC ${PCB_COMMON_SRCS} )
target_include_directories( pcbcommon PRIVATE target_include_directories( pcbcommon PRIVATE
$<TARGET_PROPERTY:thread-pool,INTERFACE_INCLUDE_DIRECTORIES> $<TARGET_PROPERTY:thread-pool,INTERFACE_INCLUDE_DIRECTORIES>
) )
target_link_libraries( pcbcommon PUBLIC target_link_libraries( pcbcommon PUBLIC
common common
delaunator delaunator

1122
common/bitmap_info.cpp Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +1,7 @@
/* /*
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2021 KiCad Developers, see AUTHORS.txt for contributors. * Copyright (C) 2022 KiCad Developers, see AUTHORS.txt for contributors.
* *
* This program is free software: you can redistribute it and/or modify it * 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 * under the terms of the GNU General Public License as published by the
@ -22,25 +21,9 @@
* This file is auto-generated by CMake when MAINTAIN_PNGS is on. Do not edit by hand! * This file is auto-generated by CMake when MAINTAIN_PNGS is on. Do not edit by hand!
*/ */
#ifndef KICAD_BITMAP_INFO_H
#define KICAD_BITMAP_INFO_H
#include <vector>
#include <bitmaps/bitmaps_list.h> #include <bitmaps/bitmaps_list.h>
#include <bitmaps/bitmap_info.h>
#include <wx/string.h> // wxT
struct BITMAP_INFO
{
BITMAPS id;
wxString filename;
int height;
wxString theme;
};
const std::vector<BITMAP_INFO> g_BitmapInfo = { const std::vector<BITMAP_INFO> g_BitmapInfo = {
${BITMAP_INFO_LIST} ${BITMAP_INFO_LIST}
}; };
#endif // KICAD_BITMAP_INFO_H

File diff suppressed because it is too large Load Diff