Commit Graph

20 Commits

Author SHA1 Message Date
Martin Cooper 8ae7de98fc Sync Mac CM108 changes with latest dev branch 2024-05-13 09:52:43 -07:00
MrColdboot f233bfb783
Update deprecated CMake command `exec_program()` (#526)
Per the cmake documentation:

  > *Changed in version 3.28:* This command is available only if policy CMP0153
  >   is not set to NEW. Port projects to the execute_process() command.
  >
  > *Deprecated since version 3.0:* Use the execute_process() command instead.

To avoid warnings or future errors, calls to `exec_program()` have been
replaced with the recommended `execute_process()` command.
2024-04-24 10:13:59 -04:00
wb2osz 654bf677a3
Merge branch 'dev' into gpiod 2023-11-22 16:07:45 -05:00
Martin Cooper b8fdf013c5 Build changes for the use of CM108 for PTT on Mac
The CMake changes are slightly complicated by the Windows build using
a local copy of some hidapi files, for some reason, instead of using
the hidapi library itself. The Mac version uses hidapi in the same way
as other libraries.

In the CMake files, it is unclear to me whether "elseif (NOT WIN32 AND
NOT CYGWIN)" means the same thing as "elseif (APPLE)", so they are
treated separately in order to avoid breaking other build types.
2023-11-15 17:02:32 -08:00
ra1nb0w 0f92f463f4
github actions implementation (#396)
* Create codeql-analysis.yml

* cmake: add support for Visual Studio 2019

* enable github actions (aka continuous integration)

basic implementation to enable github actions with:
- triggered each push or pull request
- built on ubuntu (multiple version), macOS, windows
- the binary has debug facilities enabled
- ignore any commit/push on the .github folder
- run all tests
- create an archive with binaries (available for 90 days)
- can manually triggered setting custom cmake flags

* cmake: fix MSVC check

* github actions: remove ubuntu 18.04; add ubuntu 22.04

* github actions: fix windows ci

---------

Co-authored-by: wb2osz <wb2osz@comcast.net>
2023-01-28 16:07:56 -05:00
wb2osz 397362787f Remove cmake warnings about slight name mismatches. 2022-11-25 21:26:23 +00:00
Vladimir b8919baf20
Merge branch 'dev' into gpiod 2022-07-06 20:56:57 -07:00
SASANO Takayoshi c18b562409 add sndio support (CMake) 2021-02-25 20:36:34 +09:00
wb2osz a1afcbbafe Limited support for CM108/CM119 GPIO PTT on Windows. 2021-02-07 16:19:34 -05:00
wb2osz 6f95752cab Merge branch 'feature/dns-sd' of git://github.com/hessu/direwolf into hessu-feature/dns-sd 2021-01-01 19:55:58 -05:00
Heikki Hannikainen feb1034cca Implement DNS-SD publishing of KISS over TCP service on Linux and Mac
This allows client applications to locate the IP addresses and the port of
the KISS TCP service, allowing the end user to just select a Dire Wolf from
a list instead of trying to guess its dynamic IP address and typing it in
manually.  This is especially convenient on mobile devices.

On Linux, the standard Avahi daemon is used via dbus and the avahi-client
library.  Building with it requires installing the development header
package; README.md is updated accordingly.

On Mac, the MacOS dnssd API is used:
https://developer.apple.com/documentation/dnssd?language=objc

I don't have Windows, but more recent Windows 10 builds apparently have
a working DNS-SD mDNS implementation that can be used on 64-bit builds.
2020-12-28 20:38:09 +00:00
wb2osz 791982a5e4
Merge pull request #261 from ew1abz/dev
cmake: Avoid try_run when cross-compiling
2020-11-14 10:54:43 -05:00
Vladimir K 81d11c5e93 Add libgpiod support 2020-06-14 01:34:15 -07:00
wb2osz f293186403 Issue 266 - Default compile options now allow the result to run on a
wider range of CPUs rather than optimizing for the build machine.
2020-04-22 19:39:24 -04:00
Vladimir K 45cad0ff78 cmake: Avoid try_run when cross-compiling 2020-03-29 19:12:43 -07:00
wb2osz c2b231494a Proper detection for udev. 2020-01-19 18:44:25 -05:00
Davide Gerhard 1cf5a22333
cmake: implement basic cpack functionality
to create ZIP package run

    cpack

to add new generator modify CPACK_GENERATOR variable.

NOTE: pay attention on CPU flags optimization when you redistribuite
the package (segmentation fault)
2019-11-13 15:57:11 +01:00
Davide Gerhard 8cd1f87ef6
cmake: windows build fixes
works with cygwin and x86_64-w64-mingw32-gcc/x86_64-w64-mingw32-g++
from the package installer of cygwin.
To use that add the following lines to .bash_profile

export CC=x86_64-w64-mingw32-gcc
export CXX=x86_64-w64-mingw32-g++

you also need cmake from cygwin
2019-11-09 08:31:35 +01:00
Davide Gerhard df22522126
cmake: fix cpu flags autodiscovery and terminal for raspberry
- we set cpu flags for CXX and C
- raspberry "only" has lxterminal not xterm
2019-11-09 08:26:36 +01:00
Davide Gerhard a1c16a67ef
cmake: new build tool
this step unify the builing system for all platforms (windows, linux,
osx and *BSD)

* Requirements:

  - gcc/clang (C/C++ compiler) (in debian build-essential)
  - cmake (in debian cmake)
  - git if you build from source (in debian git)
  - posix threads

** Requirements on *BSD/macOS:

  - portaudio

** Optional Requirements:

  - gpsd (in debian libgps-dev)
  - libhamlib (in debian libhamlib-dev)

** Optional Requirements in Linux

  - udev (in debian libudev-dev)
  - alsa (in debian libasound2-dev)

* Main changes:

  - version is now set only on CMakeLists.txt and automatically used
    on the code
  - cpu flags are auto-discovered in the default build and it works
    on gcc/clang/msvc on x86/x86_64/arm; you can force cpu flags with
    -DFORCE_SSE=1 for example (see CMakeLists.txt on root)
  - use a more "complex" tag on generic.conf to facilitate parsing
    by cmake (not more platform dependent). Now it is %C% or %R% for
    example
  - target `tocalls-symbols` is now called `data-update`
  - created debian/ directory to contains files to use debuild

* Example to build:

mkdir build && cd build
cmake ..
make
make install
make install-conf

then you have the binary files on src/ and in the system directory

* CMake options (see the head of CMakeLists.txt)

  - FORCE_SSE force sse instruction
  - FORCE_SSSE3 force ssse3 instruction
  - FORCE_SSE41 force ssse4.1 instruction
  - OPTIONAL_TEST compile optional test (might be broken)
  - BUILD_TESTING enable tests (ctest framework)
  - CMAKE_INSTALL_PREFIX if you want to change your install path
    prefix

for example:

  cmake .. -DOPTIONAL_TEST=ON
2019-11-09 08:26:33 +01:00