30 Commits

Author SHA1 Message Date
Vanya A. Sergeev
76c4edd4b5 update version to v2.5.0
Some checks failed
Build / build (/usr/bin/clang) (push) Has been cancelled
Build / build (/usr/bin/gcc) (push) Has been cancelled
Buildroot / build (push) Has been cancelled
2025-11-02 02:55:20 -06:00
Vanya A. Sergeev
acb5ce60f2 cmake: use <major>.<minor> for SOVERSION 2025-11-02 02:55:20 -06:00
Vanya A. Sergeev
911e989fe4 update version to v2.4.3
Some checks failed
Buildroot / build (push) Has been cancelled
Build / build (/usr/bin/clang) (push) Has been cancelled
Build / build (/usr/bin/gcc) (push) Has been cancelled
2025-02-28 16:12:39 -06:00
HopeCollector
aca6815e68 cmake: add cmake package generation
resolves #52.

Signed-off-by: Vanya A. Sergeev <v@sergeev.io>
2025-02-28 05:11:37 -06:00
Vanya A. Sergeev
4fe8f94ecc cmake: update minimum cmake version required
for CheckSourceCompiles module.

resolves #54.
2025-02-28 05:11:37 -06:00
Vanya A. Sergeev
91f9678d2a update version to v2.4.2 2023-07-05 22:20:20 -05:00
Vanya A. Sergeev
1127bb3367 cmake: update test for gpio cdev v2 support
realtime edge event timestamps require a later version.

resolves #48.
2023-07-05 22:20:20 -05:00
Vanya A. Sergeev
6c5302cf82 update version to v2.4.1 2023-04-21 01:12:57 -05:00
Vanya A. Sergeev
e9799b893e update version to v2.4.0 2023-03-31 05:14:19 -05:00
Vanya A. Sergeev
d5a9007ae5 gpio: add cdev v2 impl 2023-03-31 05:14:19 -05:00
Vanya A. Sergeev
23bfa4ab48 update version to v2.3.1 2021-01-05 02:51:56 -06:00
Vanya A. Sergeev
8c9f87227b update version to v2.3.0 2020-12-16 01:11:04 -06:00
Vanya A. Sergeev
5af41d4cf9 cmake: enable unused parameter warning 2020-12-16 00:59:35 -06:00
Vanya A. Sergeev
513f5edbcf update version to v2.2.5 2020-11-19 23:28:39 -06:00
Vanya A. Sergeev
dafd0d374d cmake: add debug and release flags to CFLAGS 2020-11-19 23:27:05 -06:00
Vanya A. Sergeev
d34077d7ee update version to v2.2.4 2020-09-11 02:09:50 -05:00
Vanya A. Sergeev
85a71a15d0 update version to v2.2.3 2020-09-03 02:37:35 -05:00
Vanya A. Sergeev
1de776e0e4 update version to v2.2.2 2020-07-24 02:24:27 -05:00
Vanya A. Sergeev
05262e6dc8 gpio: add conditional compilation of cdev implementation
with special thanks to Ryan Barnett <ryan.barnett@rockwellcollins.com>
for the original implementation.
2020-07-24 01:24:18 -05:00
Fabrice Fontaine
caadb461d3 cmake: add build option for tests
Add an option to enable or disable tests. This will allow the user to
build c-periphery without threads and will avoid the following build
failure:

[ 68%] Building C object CMakeFiles/test_serial.dir/tests/test_serial.c.o
/data/buildroot/buildroot-test/instance-0/output/build/c-periphery-2.2.1/tests/test_gpio_sysfs.c:13:10: fatal error: pthread.h: No such file or directory
 #include <pthread.h>

Fixes:
 - http://autobuild.buildroot.org/results/6bbc4de3f857dcb7ff5e6f9fa1441ba4e0af1338

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Vanya A. Sergeev <v@sergeev.io>
2020-07-24 01:23:59 -05:00
Ryan Barnett
ea1e0da26f cmake: fix identifying COMMIT_ID within build system
When using a Buildroot (a build system for generating Embedded Linux
images) to cross compile the c-periphery package, the git commit ID
from Buildroot will be used if Buildroot itself is a Git repo. For
example, Buildroot will perform a build of c-periphery at:

  buildroot/output/build/c-periphery

The buildroot directory is a Git repo but the c-periphery source
folder is not. The following command:

  git describe

will use the top-level '.git' directory in buildroot for getting the
COMMIT_ID. It will then populate the buildroot COMMIT_ID for
c-periphery itself instead of putting in 'unknown'.

Utilize '--git-dir=' option to force it to only use the '.git'
directory from within the top-level c-periphery folder.

Signed-off-by: Ryan Barnett <ryan.barnett@rockwellcollins.com>

Modifications to original commit:

* Add "/.git" suffix to path passed to --git-dir option

Signed-off-by: Vanya A. Sergeev <v@sergeev.io>
2020-07-24 01:04:48 -05:00
oficsu
80bc63dd9d cmake: use relative source and binary directory paths
The config file is not always located in the top level directory of
source tree. So, CMAKE_CURRENT_BINARY_DIR and CMAKE_CURRENT_SOURCE_DIR
are a better alternative than CMAKE_SOURCE_DIR and CMAKE_BINARY_DIR.

Signed-off-by: Vanya A. Sergeev <v@sergeev.io>
2020-06-25 23:03:45 -05:00
Vanya A. Sergeev
c2aa7d164f update version to v2.2.1 2020-05-31 22:25:08 -05:00
Vanya A. Sergeev
a750f96355 update version to v2.2.0 2020-05-29 01:24:25 -05:00
Vanya A. Sergeev
e5d58d2a51 cmake: simplify variables in pc file generation 2020-04-30 01:52:21 -05:00
Joris Offouga
671e6182cd cmake: add pkg-config pc file generation
Create libperiphery.pc file for pkg-config. Allows to use
PKG_CHECK_MODULE in cmake, meson or autotools projet.

Example with cmake:
In CMakeLists:
pkg_check_modules(CPERIPHERY libperiphery REQUIRED)

-- Checking for module 'libperiphery'
--   Found libperiphery, version 2.1.0

Signed-off-by: Joris Offouga <offougajoris@gmail.com>

Rebase to use fixed variable names and updated cmake project name.
Also, rearrange some definitions in CMakeLists.txt.

Resolves #21.

Signed-off-by: Vanya A. Sergeev <v@sergeev.io>
2020-04-30 01:52:21 -05:00
Vanya A. Sergeev
2e7ae374c0 cmake: change project name to periphery
for consistency with library name.
2020-04-30 01:52:16 -05:00
Vanya A. Sergeev
868990e9d1 cmake: fix variable name typos 2020-04-30 00:41:14 -05:00
Vanya A. Sergeev
7273c82c89 cmake: improve organization and comments in CMakeLists.txt 2020-01-16 23:52:44 -06:00
Joris Offouga
952e1e906a cmake: add cmake build support
CMake is used to control the software compilation process using simple
platform and compiler independent configuration files, and generate
native makefiles and workspaces that can be used in the compiler
environment of your choice. See: https://cmake.org/

Also with cmake support, build shared or static library, install to
$libdir, and install headers files to $includir/c-periphery.

With cmake support, it's possible to check if kernel headers is required
for build c-periphery.

Keep Makefile, because lua-periphery's build process currently expects
it.

Signed-off-by: Joris Offouga <offougajoris@gmail.com>
Signed-off-by: Vanya A. Sergeev <v@sergeev.io>
2020-01-16 23:48:17 -06:00