Skip to content

Commit c71605e

Browse files
committed
Merge branch 'feature/meson' into develop
2 parents eed15c1 + 6f1a53f commit c71605e

File tree

11 files changed

+32
-98
lines changed

11 files changed

+32
-98
lines changed

.gitignore

Lines changed: 2 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -31,37 +31,5 @@
3131
*.out
3232
*.app
3333

34-
# Autotools
35-
# http://www.gnu.org/software/automake
36-
37-
Makefile.in
38-
/ar-lib
39-
/mdate-sh
40-
/py-compile
41-
/test-driver
42-
/ylwrap
43-
44-
# http://www.gnu.org/software/autoconf
45-
46-
/autom4te.cache
47-
/autoscan.log
48-
/autoscan-*.log
49-
/aclocal.m4
50-
/compile
51-
/config.guess
52-
/config.h.in
53-
/config.sub
54-
/configure
55-
/configure.scan
56-
/depcomp
57-
/install-sh
58-
/missing
59-
/stamp-h1
60-
61-
# https://www.gnu.org/software/libtool/
62-
63-
/ltmain.sh
64-
65-
# http://www.gnu.org/software/texinfo
66-
67-
/texinfo.tex
34+
# Ninja
35+
/build*

ChangeLog

Whitespace-only changes.

Makefile.am

Lines changed: 0 additions & 8 deletions
This file was deleted.

README.md

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,31 @@ Have you ever wanted to transmit `int`,`short`,`long`,`double` or any other nume
88
## What you need to consider, when you are using this library
99
When you are using this library, you need to consider variable byte size, because if you are using different platforms, then there may be some errors, because int on platform 1 has 4 bytes and int on platform 2 may has 2 bytes.
1010

11+
## What you need to install this project ?
12+
You need [python3](https://www.python.org/), [ninja](https://ninja-build.org/) and [meson](http://mesonbuild.com).
13+
14+
```
15+
$ sudo apt-get install python3 python3-pip ninja-build
16+
```
17+
1118
## How to install
1219
```
1320
$ cd <library_directory>
14-
$ autoreconf -vis
15-
$ ./configure
16-
$ make
17-
$ make install
21+
$ mkdir build
22+
$ meson build && cd build
23+
$ ninja
24+
$ sudo ninja install
1825
```
1926

20-
If you have problems, that library can't be found run `sudo ldconfig`.
27+
If you have problems, that library can't be found run `sudo ldconfig /usr/local/lib/x86_64-linux-gnu/` if you haven't changed prefix, else mofidy path.
28+
29+
## How to include library to your c or c++ project ?
30+
It's simple. At the top of your source file include library:
31+
``` c++
32+
#include<ByteConvert/ByteConvert.hpp>
33+
```
2134

35+
And when you compile add flag `-lbyteconvert`, example `g++ -std=c++11 MyProject.cpp -lbyteconvert -o MyProject`.
2236
## Examples
2337
Convert numeric variable for eg. `int`,`short`,`float`,`double` to array of bytes.
2438
``` c++

configure.ac

Lines changed: 0 additions & 28 deletions
This file was deleted.

examples/SimpleTest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include <iostream>
22
#include <cstdlib>
3-
#include <ByteConvert.hpp>
3+
#include <ByteConvert/ByteConvert.hpp>
44

55
using namespace std;
66

libbyteconvert.pc.in

Lines changed: 0 additions & 12 deletions
This file was deleted.

libbyteconvert/Makefile.am

Lines changed: 0 additions & 5 deletions
This file was deleted.

libbyteconvert/meson.build

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
pkg = import('pkgconfig')
2+
mylib = shared_library('byteconvert', 'ByteConvert.cpp', version : '0.1.1', soversion : '0',install: true)
3+
install_headers('ByteConvert.hpp', subdir : 'ByteConvert')
4+
pkg.generate(libraries : mylib,
5+
version : '0.1.1',
6+
name : 'libbyteconvert',
7+
filebase : 'libbyteconvert',
8+
description : 'A conversion library.')

m4/.gitignore

Lines changed: 0 additions & 5 deletions
This file was deleted.

meson.build

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
project('libbyteconvert','cpp',version:'0.1.1',default_options : ['c_std=c11', 'cpp_std=c++11'])
2+
subdir('libbyteconvert')

0 commit comments

Comments
 (0)