Commit Graph

438 Commits

Author SHA1 Message Date
Eeli Kaikkonen b3c1e0330a OCC is the default cmake flag instead of OCE.
(cherry picked from commit 168a21bb43)
2021-06-16 12:47:58 -04:00
Simon Richter 5a187c6ca8 Make sure that Ninja knows the version header (fixes #4209)
This is required, because Ninja otherwise doesn't properly rebuild after
updating the version string header file.

Because BYPRODUCTS requires CMake 3.2, bump the minimum version and remove
now unused compatibility code for older CMake versions.
2020-05-15 10:51:12 +00:00
Ian McInerney fcb6f814de 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

(Cherry-picked from 25a302758e)
2020-01-18 01:44:01 +00:00
Ian McInerney 6a027662ae 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

Cherry-pick of:
3370e89967
e54c954aed
2020-01-15 16:23:22 +00:00
Seth Hillbrand d6acb64514 CMake: Fix OCE/OCC swap
unset() needs to remove the cached variable to get rid of the implicit
version

(cherry picked from commit 365f9224e7)
2019-11-18 21:20:10 +00:00
jean-pierre charras 1903052d79 Bezier curves: replace previous algorithm to convert the curve to segments.
In some cases it was not working well.
Opengl was using an other algo (using the curve properties to create segments)
Now only the OpenGL algo is used,
with optimization to reduce the number of segments.
2019-11-17 18:22:13 +01:00
Ian McInerney 3b038feae0 Cleanup cmake python dependency handling to catch errors
* Changed the KICAD_SCRIPTING flag to be a global disable, so it
  will disable all other scripting flags when set to OFF
* Added version testing with the wxPython flags to ensure the
  proper version is found for the flags provided

(cherry picked from commit 42e14b5a4e)
2019-06-27 13:41:55 -04:00
Seth Hillbrand 6eb84e42f2 cmake: Remove invalid clang syntax
Clang compiler uses the same syntax for sending flags to the linker as
gcc.  If we use -XLinker, we can't use comma-separated options but
there appears to be no reason to anyway.  Removes extra warning quieting
that was added for compiling Boost in tree.
2019-03-07 13:59:18 -08:00
Seth Hillbrand 81a5bd977b Force overlay when building GTK3
GTK3 does not provide the XOR method.  We need to force the overlay to
draw items in Page Layout editor when moving/dragging
2019-02-25 14:14:44 -08:00
Thomas Pointhuber bb7c889551 Fix check for incompatible glm version in cmake
Build fails on GCC, but not with Clang. Modify the check to only catch the
cases where GLM does not work for sure.

Reference: lp:1804030
* https://bugs.launchpad.net/kicad/+bug/1804030
2019-01-09 09:24:49 -05:00
Seth Hillbrand e8333633fe GAL: Add antialiasing options to Cairo
Cairo supports antialiasing when rendering but can be slow when set to
sub-pixel mode.  This bumps the minimum version of Cairo to 1.12
(available in 14.04 LTS as well as mingw) to support three antialias
settings (fast, good, best) that offer speed/appearance tradeoffs.

This can provide a higher-quality eeschema render as it works on a
per-element basis as opposed to the OpenGL per-screen antialias.
2019-01-04 13:39:56 -08:00
Seth Hillbrand 968ea983aa GLM: Check for incompatible glm version in cmake
GLM version 0.9.9.3 has a C++11 error that causes issues for KiCad.
Earlier version function as expected.  Since GLM is header-only, forcing
the version during compilation is sufficient to ensure that the
executable functions correctly.

Fixes: lp:1804030
* https://bugs.launchpad.net/kicad/+bug/1804030
2018-12-14 16:29:18 -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
jean-pierre charras 95bc4f74c5 Windows compil option: always define UNICODE and_UNICODE needed by Kicad that uses unicode. 2018-11-06 18:15:52 +01:00
Maciej Suminski b7b9cccffc Moved wxPython/Phoenix detection to a separate CMake module 2018-11-02 11:28:30 +01:00
Maciej Suminski 23e574fbcd Remove a redundant semicolon in Python path configuration command 2018-11-02 10:40:05 +01:00
Maciej Suminski 179c46ce49 Handle another type of wxPython/Phoenix version string
Fixes: lp:1801109
* https://bugs.launchpad.net/kicad/+bug/1801109
2018-11-02 09:42:08 +01:00
Seth Hillbrand 672e98bd89 Phoenix: Fix wxwidget version
Phoenix reports version 4.x but wxWidgets do not follow this version.
Phoenix also does not have or require the wxPython.h file.

Fixes: lp:1801109
* https://bugs.launchpad.net/kicad/+bug/1801109
2018-11-01 08:49:51 -07:00
jean-pierre charras ad99983672 Windows build: link gdiplus library on all Windows targets, not only mingw. 2018-11-01 16:03:21 +01:00
jean-pierre charras 8be3471ba2 Windows specific: define GDI_PLUS_LIBRARIES even if USE_WX_GRAPHICS_CONTEXT is not used.
Because the cairo printing system uses gdiplus library, GDI_PLUS_LIBRARIES must be always defined
2018-11-01 08:38:23 +01:00
Maciej Suminski 38f94483f4 Warn the user about wxWidgets/Python toolkit mismatch instead of overriding the setting 2018-10-31 19:17:30 +01:00
Maciej Suminski 948f28ebcc Enforce the same toolkit version for wxWidgets and wxPython libraries
Fixes: lp:1747677
* https://bugs.launchpad.net/kicad/+bug/1747677

Fixes: lp:1783634
* https://bugs.launchpad.net/kicad/+bug/1783634
2018-10-31 19:17:30 +01:00
Wayne Stambaugh 9519de8ab2 Check for wxPython.h when wxPython scripting is enabled.
Fixes lp:1785663

https://bugs.launchpad.net/kicad/+bug/1785663
2018-10-31 10:15:32 +01:00
Thomas Pointhuber 0e0b4d52a2 Add initial support for Phoenix (new wxPython binding)
Based on the work of @mmccoo:
https://kicad.mmccoo.com/2017/11/23/learnings-from-moving-kicad-to-wxpython-4-0/
and this additional patchset to remove wxpy_api.h dependency:
http://mmccoo.com/random/0001-Remove-dependence-on-pywx_api.h.patch

Please note CreatePythonShellWindow changed quite a lot. Throughful testing
should be made for the old as well as new wxPython version on all platforms
2018-10-26 13:21:11 +02:00
Seth Hillbrand 40c70dd008 Prevent excess precision errors on 32-bit builds
The compile flag -ffloat-store requires floating point values to be
stored in memory rather than in registers to prevent errors when two
numbers are compared that were stored in different locations.
2018-10-23 15:27:58 -07:00
Wayne Stambaugh 8a251163dc Revert "Turn off compiler extensions"
The compiler option caused build failures on msys2.

This reverts commit 2c22bb1a60.
2018-10-19 18:19:45 -04:00
Simon Richter cc0489f6b5 Disallow variable length arrays
This is a gcc/clang extension, not standard C++
2018-10-19 10:25:32 -07:00
Simon Richter 2c22bb1a60 Turn off compiler extensions
We want to be somewhat standards compliant if we can.
2018-10-19 10:25:05 -07: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 86ecb9fe30 Fix cmake script for PythonLibs 2018-10-19 09:59:06 +02:00
Thomas Pointhuber 7548a3b1bf Add KICAD_SCRIPTING_PYTHON3 flag to about dialog and doc 2018-10-19 09:59:05 +02:00
Thomas Pointhuber 1a11480bfd Add cmake flag to switch to python3 build 2018-10-19 09:59:05 +02:00
Thomas Pointhuber de7b362695 Rewrite some code to work on Python 2.7 and 3+ 2018-10-19 09:59:03 +02:00
Seth Hillbrand f8784f30a8 Removing OpenMP
This commit finishes the removal of OpenMP from the KiCad codebase.
Removed in this commit are the OpenMP calls in 3d-viewer and
qa/polygon_triangulation as well as all references in CMakeLists.txt

std::thread is used instead for multithreaded computation
2018-09-21 12:44:20 -07:00
Damian Wrobel f85b1479aa Fix setting default cmake build type
Changes: Sets default cmake build type before
calling project(). Current version seems to follow
https://cmake.org/pipermail/cmake/2008-September/023808.html
however, it seems to miss the comment that:
"definition of CMAKE_BUILD_TYPE occurs in the PROJECT() command"
which means that setting cmake build type should happend prior
to calling PROJECT().

Fixes: lp:1785719
* https://bugs.launchpad.net/kicad/+bug/1785719
2018-09-05 08:12:03 -04:00
Wayne Stambaugh f52da8ed96 Pcbnew: enable scripting action menu build option by default.
Fixes lp:1783690

https://bugs.launchpad.net/kicad/+bug/1783690
2018-08-21 12:54:13 -04:00
Maciej Suminski 01925fd6a7 Changed the OpenGL CMake preference to LEGACY
Certain distribution does not handle GLVND well, as the result the
accelerated canvas is not enabled. For the time being it is better to
keep using the legacy preference.

Thanks to Aurelio Lucchesi for investigating the cause.

Fixes: lp:1781581
* https://bugs.launchpad.net/kicad/+bug/1781581
2018-08-17 10:03:59 +02:00
jean-pierre charras 9a6fe2b8cd CMakeLists.txt: add a option (BUILD_SMALL_DEBUG_FILES, default off) to create smaller binaries in debug mode.
It forces link option -g1 instead og -g3 which allows basic debug.

This is especially useful on Mingw because binaries in debug build are very large:
_pcbnew.kiface: 1.25 Gb, small file option: 65Mb
2018-07-28 10:38:00 +02:00
John Beard 2e977ec369 Enable CTest tests and add qa_geometry as a test
This allows the use of `make test` or `ctest` to run all registered
tests.

The ChamferFillet/Fillet test is disabled for now as it fails.
2018-07-27 08:57:19 -04:00
Maciej Suminski 944d22c08a Fix detection of wxWidgets toolkit
wxWidgets_CONFIG_OPTIONS can be utilised to explicitly select GTK2 or GTK3. It
must be evaluated when querying the toolkit to avoid a mismatch between the
version actually used and the version KiCad assumes to be used.

Reapplied the original version. The previous patch has been modified
under an invalid assumption of being incompatible with msys2.
2018-07-27 09:08:42 +02:00
Marcus A 31f77fc040 Fix detection of wxWidgets toolkit
wxWidgets_CONFIG_OPTIONS can be utilised to explicitly select GTK2 or GTK3. It
must be evaluated when querying the toolkit to avoid a mismatch between the
version actually used and the version KiCad assumes to be used.
2018-07-26 17:23:28 +02:00
Marcus A d5f81c7255 Fix some typos in CMakeLists.txt 2018-07-26 16:47:52 +02:00
Marcus A 0dcc26f866 Update description of build options
Commit 93683d0021 changed the default build
options but did not update their description.
2018-07-26 16:47:52 +02:00
jean-pierre charras 72d1597201 DXF import: add import of DXF splines that are converted to Bezier curves.
Fix also a lot of bugs related to Bezier curves (S_CURVE shape in DRAW_SEGMENT class) in Pcbnew code.
Add missing code to handle these Bezier curves
2018-07-22 18:39:47 +02:00
Maciej Suminski 850aac5ec5 Set OpenGL_GL_PREFERENCE for CMake 3.11+ 2018-06-11 10:27:49 +02:00
Jean-Samuel Reynaud d4393b2813 Fix incorrect Eeschema BOM plugins install path on Linux.
Fixes lp:1697041

https://bugs.launchpad.net/kicad/+bug/1697041
2018-06-01 14:09:08 -04:00
Seth Hillbrand 584409b2ef Make OpenCascade more secondary
The opencascade patch intrusively checked against libraries but broke
some build scripts.  This restores the default cmake OCE behavior that was
changed by 2bab30d9a and makes the OpenCascade search truly secondary.
2018-05-15 06:40:25 -07: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
Wayne Stambaugh 5d71153eab Fix macos build bug caused by commit 2f5fdcf3. 2018-04-30 15:47:50 -04:00
Simon Richter 2f5fdcf329 Don't reference CMAKE_INSTALL_PREFIX in installation paths
This is substituted at configuration time, creating an absolute path, which
breaks overriding CMAKE_INSTALL_PREFIX at installation time, breaking the
workflow for installation using GNU stow.
2018-04-30 10:32:15 -04:00