Add KICAD_USE_FONT_REDUCED_SET (default OFF) to build options.

It allow using the previous font set without CJK.
The new font (with CJK) is very large (10x), and can create (on Opengl) out of memory issues
with some graphic cards.
This commit is contained in:
jean-pierre charras 2019-10-07 09:50:24 +02:00
parent bdf7fb9e95
commit 34b26a0ac7
5 changed files with 14422 additions and 1 deletions

View File

@ -108,6 +108,10 @@ option( KICAD_SPICE
"Build KiCad with internal Spice simulator."
ON )
option( KICAD_USE_FONT_REDUCED_SET
"Build KiCad with a reduced font set, without CKJ font. Avoid out of memory issue with some graphic cards on OpenGL"
OFF )
# Not supported by all platforms (for instance mingw)
option( KICAD_SANITIZE
"Build KiCad with sanitizer options. WARNING: Not compatible with gold linker"

View File

@ -0,0 +1,138 @@
Symbols used to create makefiles and compil Kicad:
Definitions and usage
KICAD_SCRIPTING
Build the Python scripting support inside KiCad binaries.
Default ON.
KICAD_SCRIPTING_MODULES
Build native portion of the pcbnew Python module: _pcbnew.{pyd,so} for OS command line use of Python.
Default ON
KICAD_SCRIPTING_PYTHON3
Build for Python 3 instead of 2.
If using WXPYTHON, the python version must be the same as the version used to build wxPython
Default OFF.
KICAD_SCRIPTING_WXPYTHON
Build wxPython implementation for wx interface building in Python and py.shell.
Default ON.
KICAD_SCRIPTING_WXPYTHON_PHOENIX
Use new wxPython binding.
Default OFF.
KICAD_SCRIPTING_ACTION_MENU
Build a tools menu with registered python plugins: actions plugins.
Default ON.
KICAD_USE_OCE
Build tools and plugins related to OpenCascade Community Edition.
Needed to support import/export STEP
Default ON.
KICAD_USE_OCC
Build tools and plugins related to OpenCascade Technology.
Overrides KICAD_USE_OCE
Default OFF.
KICAD_INSTALL_DEMOS
Install KiCad demos and examples.
Default ON.
KICAD_BUILD_QA_TESTS
Build software Quality assurance unit tests.
Default ON.
BUILD_GITHUB_PLUGIN
Build the GITHUB_PLUGIN for pcbnew.
Default ON.
KICAD_SPICE
Build KiCad with internal Spice simulator.
Default ON.
KICAD_USE_FONT_REDUCED_SET
Build KiCad with a reduced font set, without CKJ font.
Avoid out of memory issue with some graphic cards on OpenGL.
Default OFF.
BUILD_SMALL_DEBUG_FILES
In debug build: create smaller binaries.
On Windows, binaries created by link option -g3 are *very large*
(more than 1Gb for pcbnew, and more than 3Gb for the full kicad suite)
This option create binaries using link option -g1 that create much smaller files, but
there are less info in debug (However the file names and line numbers are available)
Default OFF.
# Not supported by all platforms (for instance mingw)
KICAD_SANITIZE
Build KiCad with sanitizer options.
WARNING: Not compatible with gold linker.
Default OFF.
KICAD_STDLIB_DEBUG
Build KiCad with libstdc++ debug flags enabled.
Default OFF.
option( KICAD_STDLIB_LIGHT_DEBUG
Build KiCad with libstdc++ with -Wp,-D_GLIBCXX_ASSERTIONS flag enabled.
Not as intrusive as KICAD_STDLIB_DEBUG
Default OFF.
KICAD_BUILD_PARALLEL_CL_MP
Build in parallel using the /MP compiler option (Default OFF for safety reasons).
Default OFF.
option( KICAD_USE_VALGRIND
Build KiCad with valgrind stack tracking enabled.
Default OFF.
When option KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES is enabled:
PYTHON_EXECUTABLE can be defined when invoking cmake
( use -DPYTHON_EXECUTABLE=<python path>/python.exe or python2 )
when not defined by user, the Default is python.exe under Windows and python2 for others
python binary file should be in exec path.
Note 1:
KICAD_SCRIPTING controls the entire python scripting system.
If it is off, no other scripting is allowed
Therefore, if KICAD_SCRIPTING is OFF, these other option are forced to OFF:
KICAD_SCRIPTING_MODULES, KICAD_SCRIPTING_ACTION_MENU,KICAD_SCRIPTING_PYTHON3
KICAD_SCRIPTING_WXPYTHON, KICAD_SCRIPTING_WXPYTHON_PHOENIX
Note 2:
KICAD_SCRIPTING_WXPYTHON_PHOENIX requires enabling the KICAD_SCRIPTING_WXPYTHON flag
so that the wxWidgets library is properly versioned
Note 3
These Symbols are always defined, and are not an option for cmake invocation:
COMPILING_DLL:
This is a signal to import_export.h, and when present, toggles the
interpretation of the #defines in that file. Its purpose should not be
extended beyond this.
USE_KIWAY_DLLS:
Comes from CMake as a user configuration variable, settable in the Cmake
user interface. It decides if KiCad will be built with the *.kiface program
modules.
BUILD_KIWAY_DLL:
Comes from CMake, but at the 2nd tier, not the top tier. By 2nd tier,
something like pcbnew/CMakeLists.txt, not /CMakeLists.txt is meant. It is
not a user configuration variable. Instead, the 2nd tier CMakeLists.txt file
looks at the top level USE_KIWAY_DLLS and decides how the object files under
the 2nd tier's control will be built. If it decides it wants to march in
lockstep with USE_KIWAY_DLLS, then this local CMakeLists.txt file may pass a
defined BUILD_KIWAY_DLL (singular) on the compiler command line to the
pertinent set of compilation steps under its control.

View File

@ -28,12 +28,18 @@ if( NOT APPLE ) # windows and linux use openssl under curl
find_package( OpenSSL REQUIRED )
endif()
if( KICAD_USE_FONT_REDUCED_SET )
set( FONT_SRC "newstroke_font_without_CJK.cpp" )
else()
set( FONT_SRC "newstroke_font.cpp" )
endif()
set( GAL_SRCS
# Common part
basic_gal.cpp
draw_panel_gal.cpp
gl_context_mgr.cpp
newstroke_font.cpp
${FONT_SRC}
painter.cpp
text_utils.cpp
gal/color4d.cpp

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff