Commit Graph

398 Commits

Author SHA1 Message Date
Ian McInerney fdf6318218 Ensure cmake commands depend on the cmake file they use
Without this dependency, the build stage won't rerun
if the CMake file changes on disk.
2021-01-28 00:24:22 +00:00
Ian McInerney 9263c0d554 Wrap linux metadata translation in a error catching wrapper
This will gracefully handle errors that prevent the file translation
by simply copying the file if they occur. This allows the build to
proceed and the logs to contain the error.
2021-01-28 00:24:22 +00:00
Ian McInerney beb50c529e Reorganize the CMake folder to separate build and configure steps
The BuildSteps folder now contains the CMake scripts that are
called during the build process as individual stages, while
the root CMakeModules directory contains the CMake files used
during the configuration phase.
2021-01-28 00:24:22 +00:00
Ian McInerney 09f1e32513 Rebuild linux metadata on dictionary updates 2021-01-28 00:24:22 +00:00
Marek Roszko 7b5397f81f Move PLUGINDIR to the make config.h 2021-01-27 19:12:19 -05:00
Marek Roszko 320ca5a0d0 Prevent KiCad launch on Windows 7 if python 3.8 or newer is bundled
Soon to be a permanent check regardless of python on Windows
2021-01-21 21:58:53 -05:00
Marek Roszko 82ecb0f77b Fix vcpkg python build compatibility 2021-01-20 21:05:23 -05:00
Ian McInerney 2aff8822d6 Rearrange linux resources and translate MIME files 2021-01-18 17:43:34 +00:00
Ian McInerney 43baf2e3f2 Translate the linux metadata files 2021-01-18 17:43:34 +00:00
Ian McInerney 1a025ae7ba Reorganize the translations to work with msgfmt executable
The -d option for the msgfmt executable requires that all
the locales have their po files in the same directory
and be named LOCALE.po.
2021-01-18 17:43:33 +00:00
Ian McInerney e9fa9f68b2 Integrate the i18n CMake into the main CMake
This adds a new target i18n that will compile all the translation
files.
2021-01-18 17:43:33 +00:00
Seth Hillbrand 2cb8dff650 Use KICAD_DATA for data path lookup in scripting
Fixes https://gitlab.com/kicad/code/kicad/issues/7036
2021-01-12 08:22:17 -08:00
Steven Falco d85d0efdd8 Add python 3.10 detection to CMake 2020-11-28 22:25:43 +00:00
Marek Roszko 8635fc823b Fix findwxwidgets again to let VS/MSYS2 combo work 2020-11-13 19:17:33 -05:00
Marek Roszko c45edeb1f8 Fix FindwxWidgets.cmake to work with mingw
This lets one use CLion with MSYS2 ;)
2020-11-12 19:23:34 -05:00
Seth Hillbrand 9ed6cdd943 Remove GITHUB plugins
KiCad github downloads are no longer supported

Fixes https://gitlab.com/kicad/code/kicad/issues/6182
2020-10-29 16:45:04 -07:00
Marek Roszko ff977b050a Fix FindwxWidgets.cmake on vcpkg so that it fully completes 2020-10-14 19:18:38 -04:00
Simon Richter 53579c42ad Disable -Wpsabi
There was an ABI change for 64 bit aligned vectors between gcc 5 and gcc 6
on a few 64 bit platforms, and gcc 10 reports "note" level warnings for
each affected access, which is very noisy and hides more important
information.

These notes are issued because there is no reliable diagnostic for actual
problems.
2020-10-12 22:34:05 +00:00
Simon Richter 70e62e384d Document what -Wvla does and why we want to treat it as an error 2020-10-12 22:34:05 +00:00
Mark Roszko a8bd0a9b84 Handle Windows manifests ourselves and add dpi awareness option 2020-10-10 19:08:23 +00:00
Mark Roszko 7656663a2f Fix Python integration to build with vcpkg
* Add vcpkg support to find Oython using CMake
* Fix pid_t conflict with python
* Fix COMPILER conflict with python
2020-09-22 12:39:05 +00:00
Seth Hillbrand 514838dbbf Version the lockfile
We are now versioning the configuration files, so we should apply the
same versioning to the lockfiles.

Fixes https://gitlab.com/kicad/code/kicad/issues/5637
2020-09-15 09:31:55 -07:00
Mark Roszko aa34f2e764 Fix findopencascade for vcpkg 2020-09-12 22:41:17 +00:00
Jeff Young e782794f96 Flesh out object properties and DRC Rule syntax help. 2020-09-05 17:44:59 +01:00
Ian McInerney 0a1d8c1aaa Move lemon parser generation into build directory
This moves the generated files out of the source tree and into
the build directory. They are now regenerated each time they are
needed, based on the timestamp of the generated file compared to
the timestamp of the lemon file.

To do this, we also bundle lemon into the thirdparty directory
and build it for ourselves since it is a very tiny program and
not all platforms seem to distribute it in a consistent manner.

Fixes https://gitlab.com/kicad/code/kicad/issues/5013
2020-08-10 13:53:54 +00:00
Jeff Young f244f3b24c Last issue wasn't gcc/CLang after all, but the lexer not getting built. 2020-08-06 23:16:58 +01:00
Ian McInerney 7d1deb8a3b Add Python 3.9 interpreter
This was forgotten in the original commit
7fd661f06b
that added the 3.9 library.
2020-07-22 00:18:29 +01:00
Ian McInerney 9997c46ee4 Make Coverity use the main KiCad version string
Also create a kicad_build_version.txt file in the build directory
that only contains the version string.
2020-07-22 00:18:29 +01:00
Wayne Stambaugh abcbfaa481 Fix ngspice version information issue.
The config.h header for ngspice is not packaged with all platforms so
use pkg-config to fetch the version information when available.  When
pkg-config is not available, check if the ngspice/config.h file is
installed on the system before including it to build the ngspice version
string.  If neither pkg-config or ngspice/config.h is available set the
version string to "unknown".

Fixes https://gitlab.com/kicad/code/kicad/issues/4851
2020-07-11 19:07:10 -04:00
Ian McInerney b5adf5bb21 Only try to remove the implicit conversion warning if it is supported 2020-07-03 02:59:19 +01:00
Ian McInerney c27207500d Cleanup some compiler warnings 2020-07-03 00:10:31 +01:00
Seth Hillbrand 7e3a338518 Move warning flags to proper place
Cleans unitialized warnings in wxApps
2020-07-02 12:17:45 -07:00
Steven A. Falco 7fd661f06b Add Python 3.9 compatibility
Taken from downstream Fedora commit.

Original author info:
Charalampos Stratakis <cstratak@redhat.com>  2020-05-28 12:26:59

Downstream commit: a2677c159ad529
2020-05-29 19:37:13 +00:00
jean-pierre charras 27b9377d3c Findngspice.cmake: fix not found libngspice dll on msys.
Recent msys version does not find libngspice-0.dll, only
libngspice-0.dll.a when using find_library.
When not found, a find_file is made, instead of find_library.
2020-05-25 11:57:41 +02:00
Ian McInerney 0658d297e5 Cleanup cmake for documentation creation 2020-05-17 01:00:37 +01:00
Ian McInerney e4b6487fca Overhaul compiler warnings infrastructure
* Track our warnings separate from normal flags
* Remove all warnings from the SWIG code
* Add more GCC warnings
2020-05-06 01:47:20 +01:00
Matthias Urlichs 3bba96baa2 Allow SWIG 4.0.
No other changes are necessary.
2020-05-05 13:22:41 +00:00
Simon Richter 23c1837eba Fix typo 2020-05-02 11:19:03 +00:00
Ian McInerney 71332fcb77 Add Clang's version of -Wsuggest-override 2020-04-25 01:09:30 +01:00
Ian McInerney 5a4e4aea67 Enable new warnings 2020-04-25 00:46:29 +01:00
Wayne Stambaugh 082944ad06 Minor build warning fixes. 2020-04-03 13:03:23 -04:00
Ian McInerney a2ad9d67ba Expose more version strings from CMake
Let cmake generate the needed version strings, so we don't
have to spend program time doing it. This simplifies the
settings manager versioning.

Also, convert some file line endings to UNIX from Windows.

A more robust fix for https://gitlab.com/kicad/code/kicad/-/issues/4015.
2020-03-07 18:43:24 +00:00
jean-pierre charras 5d5363396c Add automatically generated files needed for translations.
These help files are created from the .md source files and contain I18n strings,
but do not exist if kicad is not built from sources.
However they are needed by translators.
2020-01-29 18:47:06 +01:00
Ian McInerney 25a302758e Fix macos plist version string generation
Generate these resource files similar to how it is done one Linux.

Fixes mac-builder issue https://gitlab.com/kicad/packaging/kicad-mac-builder/issues/275
2019-12-26 12:42:25 +00:00
Ian McInerney 3370e89967 Update Linux appdata file and CMake version strings
CHANGED: Update the Linux appdata file to include new tags

* Include version tags (and others) in the appdata file
* Refactor the version string generation to clean it up
2019-12-18 17:24:07 +00:00
Jon Evans d5140d87cd Fix indentation in previous commit 2019-11-29 21:22:56 -05:00
Jon Evans 719a70b510 Update FindwxWidgets.cmake to work under MSW/vcpkg
Taken from: https://github.com/CaeruleusAqua/vcpkg-wx-find/blob/master/FindwxWidgets.cmake
2019-11-29 21:11:44 -05:00
jean-pierre charras 9c1c609fa3 Better error message in Findngspice.cmake on msys. 2019-10-30 08:59:32 +01:00
jean-pierre charras 49dbc37277 Fix a few issues related to help files in html or markdown.
Fix *.cmake scripts that dropped the semicolon in strings during conversion.
Move markdown2html in a separate library.
2019-10-01 17:11:39 +02:00
jean-pierre charras 9339afcc26 minor fixes about translatable help files in markdown 2019-10-01 09:56:35 +02:00
jean-pierre charras c5ba341d5b markdown2C.cmake: refinement: accept " in .md files. 2019-09-30 08:58:53 +02:00
jean-pierre charras 1c03d6dec2 Add missing file 2019-09-29 17:36:46 +02:00
Wayne Stambaugh 1320dda9cb Set version string to 5.99.0
This will sync the git tag for this commit.  This should help prevent
confusion for users who were thinking that 5.0.0-r#####-g######## was
an older version than the 5.1 branch.
2019-08-26 11:42:02 -04:00
Jeff Young a25368cc6b Improve spelling.
The groundwork here is thanks to kunda1.

Fixes: lp:1831510
* https://bugs.launchpad.net/kicad/+bug/1831510
2019-08-20 19:14:05 +01:00
Simon Richter bed70339b8 Remove own copy of FindOpenSSL.cmake 2019-07-17 08:10:47 -04:00
Simon Richter c8c3e1f96a Fix build order for generated headers and sources
This changes make_lexer() so that it no longer generates a custom target
but instead attaches the generated files to an existing one (so the first
argument now is the name of an existing library or executable, and it needs
to come after the add_library/add_executable call).

The generated source is no longer listed in the project sources, as it is
added by the function. The files are generated in the build tree rather
than the source tree, and the directory is added to the include path for
the respective project as well as exported to projects linking against it.

Generated files in subdirectories are somewhat supported, but need to be
referenced with the same name as they were generated (i.e. including the
subdirectory name).

Fixes: lp:1831643
* https://bugs.launchpad.net/kicad/+bug/1831643

Fixes: lp:1832357
* https://bugs.launchpad.net/kicad/+bug/1832357

Fixes: lp:1833851
* https://bugs.launchpad.net/kicad/+bug/1833851
2019-07-03 09:36:40 -04:00
jean-pierre charras 8d84e22f31 Functions.cmake: add missing dependency to *.keywords.
Due to this missing dependency, when a xxx.keyword file was modified, the files built from it were not rebuilt
2019-06-26 19:25:24 +02:00
Seth Hillbrand e6e4000863 CMake: Add generated lexer files to clean list
When running make clean, we'd like to remove all generated files
including the lexer files to allow for a fresh rebuild
2019-06-18 06:22:18 -07:00
Seth Hillbrand 8112a8ade1 cmake: Further petting dependencies
eeschema cpp files consume generated header files that have targets in
the common directory, so no dependencies get created from eeschema.  We
add the dependencies in common to force the setting through libraries.

Fixes: lp:1831643
* https://bugs.launchpad.net/kicad/+bug/1831643
2019-06-13 06:51:52 -07:00
Seth Hillbrand 720889edd0 CMake: Another go at linear dependencies
This simplifies the linear dependencies for custom targets.  Should be
single shot for make this time.

Fixes: lp:1831643
* https://bugs.launchpad.net/kicad/+bug/1831643
2019-06-10 14:47:14 -07:00
jean-pierre charras 074ebe0e2b Pl_editor: fix missing switch to "C" locale when saving selected items in clipboard.
It was only noticeable in countries using a comma as floating point separator.

Fixes: lp:1832211
https://bugs.launchpad.net/kicad/+bug/1832211
2019-06-10 11:55:52 +02:00
Seth Hillbrand c6af38477d CMake: Handle custom_target indirection
Building custom targets that depend on custom commands such as our
keyword lexer requires two layers of indirection to pick up changes
properly and not overwrite the same file in parallel builds.

Fixes: lp:1831643
* https://bugs.launchpad.net/kicad/+bug/1831643
2019-06-05 13:05:43 -07:00
jean-pierre charras 7508f02de5 KiCadVersion.cmake: fix Kicad version id to 6.0.0, used when git is not available to calculate this version id 2019-05-02 09:10:57 +02:00
John Beard f4ba3cd910 QA: Add build-time option to enable XML output from tests
This allows CI tools to get machine-readable test reports.

By default, this is off - when you test normally, you probably
want the regular console spew.

Boost tests use the in-built Boost test command line options.

The Python tests take an --xml parameter and output the tests
there.
2019-04-18 10:59:06 +01:00
John Beard 45aa514591 QA: Allow to build tests manually if disabled
Add a new CMake target, qa_all, which builds all
tests, tools and their deps.

Then, when KICAD_BUILD_QA_TESTS is set OFF, remove tests
and tools from the ALL target, so `make all` doesn't include
these builds.

This means even when you turn the KICAD_BUILD_QA_TESTS option
off, you still have the option to:

* Build individual tests: `make qa_pcbnew`
* Build all tests: `make qa_all_tests`
* Build all tools: `make qa_all_tools`
* Build all QA executables: `make qa_all`

This also will provide a place to hang extra logic for test routine
wrangling (e.g. by CI tools)

Update the "Compiling KiCad" dev docs.

Also, CMakeModules .cmake files should not be excluded from git
2019-04-17 18:00:40 +01:00
Wayne Stambaugh 00a9b662f7 Version 6 development begins here. 2019-03-08 13:04:08 -05:00
Wayne Stambaugh 605473be1d Tag release version 5.1.0. 2019-03-08 07:31:50 -05:00
Wayne Stambaugh 4964ec4d20 Start next 5.1 development version. 2019-02-25 17:51:31 -05:00
Wayne Stambaugh 6ec2c5ffc9 Tag 5.1.0-rc2 release. 2019-02-25 17:51:31 -05:00
Seth Hillbrand ad77863668 Cleanup build script locations
Some developer scripts ended up in the demonstration scripts directory
that was bundled with builds.  This moves them to the build_tools
directory and updates the associated Documentation

Fixes: lp:1815891
* https://bugs.launchpad.net/kicad/+bug/1815891
2019-02-14 14:44:55 -08:00
Wayne Stambaugh 8bc870c753 Start next 5.1 tag. 2019-02-05 18:46:24 -05:00
Wayne Stambaugh 2d1b1d6b05 Tag 5.1.0-rc1 release. 2019-02-05 18:13:56 -05:00
John Beard bb2ae8e13b Bitmaps: move bitmap defs to bitmaps library
The bitmap definitions (BITMAP_DEF and so on) do not
have any dependencies on other libs, including WX. This
means the bitmaps library can be isolated from the other
dependencies.

Common now depends on bitmaps, and libraries that depend
on common can pick it up from the common target_link_libraries,
as it is PUBLIC. This means a lot of targets no longer
need manual bitmap linkage.

This avoids a circular dependency that was previously reported
by static analysis.

Avoiding pulling in WX and other headers into the include
tree of each bitmap .cpp is a huge speed up (around 10x) in
compilation, and the generated static library is also 10x
smaller (20MB vs 200MB)

Add common as a link library to pnsrouter,connectivity.
THese library do still use common code (including bitmaps,
via base_screen.h) and this allows them to pick up the libcommon
includes correctly.
2019-02-04 19:29:31 -08:00
John Beard 4363cc0bec Docs: add docset generation target
This is a CMake (non-ALL) target that will build a Zeal-compatible
docset from a version of the doxygen HTML.

To do this, doxytag2zeal is used.
2018-12-03 10:14:15 -05:00
Maciej Suminski b7b9cccffc Moved wxPython/Phoenix detection to a separate CMake module 2018-11-02 11:28:30 +01:00
Maciej Suminski 1c19a50f31 Add license header to Findngspice.cmake 2018-11-02 09:42:08 +01:00
Maciej Suminski b445b0fab2 Link eeschema with ngspice DLL
Adds a link-time dependency for libngspice, so that other tools may
detect ngspice as a KiCad dependency.

The library is still loaded with dlopen() as it gives a way to reload it
in case of problems. The DLL name is recognized during CMake
configuration and used to load the library at runtime.
2018-10-30 08:32:38 +01:00
Thomas Pointhuber 4a2a76af37 Improve CMake Python code
* We have code with u'' which means minimum version is 3.3
* Python 3.8 is already in development, be a bit more future proof
2018-10-19 09:59:06 +02:00
Thomas Pointhuber e729454409 Add missing python 3 versions to FindPythonLibs.cmake 2018-10-19 09:59:05 +02:00
Martin Aberg 27d57d9191 Generate PYTHONPATH from CMake information
The CMake scripts calculate the install path for python scripts by
  distutils.sysconfig.get_python_lib(
    plat_specific=0,
    standard_lib=0,
    prefix=''
  )
which generates a string in line with
  lib/python2.7/site-packages

This string ends up in the CMake variable PYTHON_DEST and is used by the
install step as destination directory for pcbnew.py.

There has been a hard-coded assumption on the content of that string in
PcbNew which is not compatible with FreeBSD 11.1.

This commit eliminates the hard-coded assumption in PcbNew and reuses
the install path as known by CMake.

Fixes: lp:1777921
* https://bugs.launchpad.net/kicad/+bug/1777921

(cherry picked from commit dd3c24faf8)
2018-09-20 12:04:04 -07:00
Wayne Stambaugh 1a22918795 Tag version 6.0.0-rc1-dev. 2018-07-13 16:19:53 -04:00
Wayne Stambaugh 84427f463c Tag release 5.0.0. 2018-07-13 15:53:52 -04:00
Wayne Stambaugh 520c6116f5 Version 5.0.0-rc3-dev commit. 2018-06-30 11:16:42 -04:00
Wayne Stambaugh 66a489f6b6 Version 5.0.0-rc3 commit. 2018-06-30 11:02:38 -04:00
Seth Hillbrand e95d06e811 OCC: Fix issues for OpenCascade 7.3
OpenCascade 7.3 deprecates some TK libraries that were not required by
KiCad, therefore we should not include them in the compile.

Also correct missing compiles for STEP import/export induced by 584409b2e when using OCCT.  There is no effect on OCE to this change.
2018-06-12 10:03:13 -07:00
Wayne Stambaugh c49a4398a1 Set KiCad version to 5.0.0-rc2-unknown for next development cycle. 2018-05-20 21:24:18 -04:00
Wayne Stambaugh b4f9b5359d Set KiCad version to 5.0.0-rc2. 2018-05-20 21:20:28 -04:00
Seth Hillbrand 2bab30d9ac Allow Kicad to use OpenCascade
Adds the option of using OpenCascade not just the community edition.

Fixes: lp:1628950
* https://bugs.launchpad.net/kicad/+bug/1628950
2018-05-11 17:04:32 -07:00
Seth Hillbrand 2e0b75c058 Remove internal CheckCXXSymbolExists
Since Cmake 2.8.6, Cmake provides this macro.  Our use references
internal Cmake variables that have changes in Cmake 3.11.
2018-03-30 14:47:16 -07:00
Wayne Stambaugh 50608c19ff Tag beginning of 5.0.0-rc2 developemnt. 2018-02-24 19:51:04 -05:00
Wayne Stambaugh 42e07736a5 Set kicad version to 5.0.0-rc1 for v5 branch. 2018-02-24 16:14:48 -05:00
Wayne Stambaugh a2df82537b Change how version strings are generated.
Git is always used to generate the KiCad version string using the
command `git describe --dirty`.  This gives a more concise and
accurate version string than the previous method.  When git is not
available, the version string defaults to the value defined in
KiCadVersion.cmake.  It is imperative that moving forward that the
default version string be updated the commit following a git tag
so that when git is not available, the last known commit following
a git tag will at least give some usable information about which
development branch of KiCad was used for a build.
2018-02-16 11:45:58 -05:00
Chris Pavlina 87cc3ea445 Update message in Findngspice.cmake 2018-01-08 23:30:48 -07:00
jean-pierre charras 4e391ef21c Housekeeping: remove no more in use options. 2017-11-02 21:01:32 +01:00
Simon Richter d2860ee0ad Update FindGLEW.cmake 2017-07-28 11:30:22 +02:00
Kristoffer Ödmark 8590a22995 Cpp11 compability steps.
-Changed coding style to not have exception specifications.
-Changed autogenerated Lexer code to not have exception specifications.
2017-06-12 11:47:20 -04:00
Jan Mrázek ade263f30d Check required libraries in FindwxWidgets.cmake
Both official one and KiCad one version of FindwxWidgets.cmake do not check if
all the required components are part of the wxWidgets build. This couses trouble
on Ubuntu when user misses libwxgtk3.0-dev package - CMake succeeds, build does
not.

This fix was accepted also to the CMake 3.9 upstream
(https://gitlab.kitware.com/cmake/cmake/merge_requests/704).

Fixes: lp:1630020
* https://bugs.launchpad.net/kicad/+bug/1630020
2017-04-26 20:43:29 -04:00
Maciej Suminski 24a9003b5e Removed obsolete Shader.cmake script
Better way of including shader programs was introduced in 77f9cd0c
2017-03-04 11:48:37 +01:00
Simon Richter 78a5f450ce Copy and adapt FindCairo.cmake for Pixman 2017-02-01 19:22:47 -05:00
Tomasz Włostowski 90a39582b5 added missing FindPixman script 2016-12-12 16:45:52 +01:00