* CMakeLists.txt: allow disabling Python support
In some cases, even if Swig is found and Python3 is found, it may not
be desirable to build Python support in avrdude, so this commit adds
a FORCE_DISABLE_PYTHON_SUPPORTT option to be able to explicitly
disable the Python support.
To preserve existing behavior, this option defaults to disabled (OFF).
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Co-authored-by: Xiaofan Chen <xiaofanc@gmail.com>
Some downstream projects build avrdude and want to add their
own version information to the avrdude version to distinguish
their builds from others.
This adds a clean way to do that without needing to patch the
avrdude sources, for both cmake and automake based builds:
cmake -DEXTRA_VERSION:STRING=-arduino.1-rc1
../configure EXTRA_VERSION=-arduino.1-rc1
After building avrdude, the last line of "avrdude -?" will now
look similar to the following, depending on whether you are
building an avrdude git checkout or an avrdude release tarball:
avrdude version 8.0-20240901-arduino.1-rc1 (30e19f23), https://github.com/avrdudes/avrdude
avrdude version 8.1-arduino.1-rc1 (30e19f23), https://github.com/avrdudes/avrdude
Build parallel port code on supported systems
Unsupported systems are:
* Windows operating system
* MacOS operating system
This means the CI can test
* native Linux builds (yes, even for arm systems)
Untested at this time are the BSDs.
Removes the dysfunctional Windows (since Windows XP) parallel port code,
and has the buildsystems fail Windows builds if parallel port builds are
requested (HAVE_PARPORT or --enable-parport).
https://github.com/avrdudes/avrdude/pull/1874#issuecomment-2275762550
The Fedora mingw environment comes with pdcurses, which states
> Note that ncurses is not available for MinGW / Windows.
> Applications which need curses functionality can use this
> package, provided they don't use any of the extensions
> specific to ncurses.
This at least allows the cross compile build to succeed, I
have not tested the executable under Windows or Wine.
The standard cmake messages of pkg_check_modules might be confusing
when being used as here, i.e. when searching for the highest compatible
version.
So suppress these standard messages and print manual ones instead.
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
This ancient libgpiod version is still shipped on Ubuntu 20.04 LTS.
Add support for it by adding another helper.
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
libgpiod in version 2 or above introduced an API change which results
in compile error with the current code.
This commit adds some glue magic for the newer versions and
tries to detect the used libgpiod version based on the information
available in the pkg-config files.
At the moment, this eliminates the possibility to statically link
against this library.
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
Quoting CMakeLists.txt: "[...] of latest commit"
"Latest commit" is better served by using the committer date %cd
instead of the author date %ad: The author date could be some time
last year with committer date being today.
Note this affects both autotools and cmake buildsystems to keep
the generated version message dates and year in sync.
Fix the following build failure without a C++ compiler:
CMake Error at CMakeLists.txt:24 (project):
No CMAKE_CXX_COMPILER could be found.
Tell CMake where to find the compiler by setting either the environment
variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
The main CMakeLists.txt file in the project's root directory takes
care of the main project settings like project name and version,
handling the options, finding dependencies, etc.
The src/CMakeLists.txt handles options that are necessary to build
libavrdude library and avrdude binary.