Skip to content
This repository was archived by the owner on Feb 12, 2025. It is now read-only.

Commit 96f04d3

Browse files
Update changelog and versions for first release
1 parent ef97696 commit 96f04d3

File tree

5 files changed

+31
-6
lines changed

5 files changed

+31
-6
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Changelog
2+
0.9.0 (2018-05-14)
3+
==================
4+
5+
First beta release of libledger-core for Ledger Vault integration

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ include(UseBackportedModules)
1010

1111
# The project version number.
1212
set(VERSION_MAJOR 0 CACHE STRING "Project major version number.")
13-
set(VERSION_MINOR 0 CACHE STRING "Project minor version number.")
14-
set(VERSION_PATCH 1 CACHE STRING "Project patch version number.")
13+
set(VERSION_MINOR 9 CACHE STRING "Project minor version number.")
14+
set(VERSION_PATCH 0 CACHE STRING "Project patch version number.")
1515
mark_as_advanced(VERSION_MAJOR VERSION_MINOR VERSION_PATCH)
1616

1717
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY build)

README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ git clone --recurse-submodules https://github.com/LedgerHQ/lib-ledger-core.git
1111
## Dependencies
1212

1313
### Build
14-
This project is based on **_cmake_** as a build system so you should install it before starting.
14+
This project is based on **_cmake_** as a build system so you should install it before starting (at least version 3.7).
1515

1616
### External dependencies:
17-
* [Qt5](https://www.qt.io/download) is needed to build the C++ library.
17+
* [Qt5](https://www.qt.io/download) is needed to build tests of the library.
1818
* Generation of binding is automated with [Djinni](https://github.com/dropbox/djinni).
1919
* Build on multiple Operating Systems is based on [polly](https://github.com/ruslo/polly) toolchains.
2020

@@ -32,6 +32,15 @@ If you respect this folder structure (and naming), after `cd lib-ledger-core-bui
3232
cmake -DCMAKE_INSTALL_PREFIX=/path/to/qt5 ../lib-ledger-core && make
3333
```
3434

35+
### Building for JNI
36+
37+
Building with JNI (Java Native Interface), allows you to use the library with Java based software. In order to enable JNI mode use
38+
```
39+
cmake -DTARGET_JNI=ON
40+
```
41+
42+
This will add JNI files to the library compilation and remove tests. You need at least a JDK 7 to build for JNI (OpenJDK or Oracle JDK)
43+
3544
## Binding to node JS
3645

3746
Generate binding (under `build/Release/ledgerapp_nodejs.node`):

core/src/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,5 +265,8 @@ target_include_directories(ledger-core PUBLIC ../lib/cereal/)
265265
target_include_directories(ledger-core PUBLIC ../lib/date/)
266266
target_include_directories(ledger-core PUBLIC ../lib/secp256k1)
267267

268+
target_compile_definitions(ledger-core PRIVATE LIB_VERSION_MAJOR=${VERSION_MAJOR} LIB_VERSION_MINOR=${VERSION_MINOR}
269+
LIB_VERSION_PATCH=${VERSION_PATCH})
270+
268271
install(TARGETS ledger-core DESTINATION "lib")
269272
install(FILES ${LEDGER_CORE_API_HEADERS} DESTINATION "include/ledger-core")

core/src/ledger-core.h

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
#ifndef LEDGER_CORE_LEDGER_CORE_H
3232
#define LEDGER_CORE_LEDGER_CORE_H
3333

34+
#include <boost/preprocessor.hpp>
35+
3436
/**
3537
* Ledger root namespace
3638
*/
@@ -41,8 +43,14 @@ namespace ledger {
4143
*/
4244
namespace core {
4345

44-
const int LIB_VERSION = 1;
45-
const std::string LIB_STRING_VERSION = "1.0.0";
46+
const int LIB_VERSION = LIB_VERSION_MAJOR << 16 | LIB_VERSION_MINOR << 8 | LIB_VERSION_PATCH;
47+
const int VERSION_MAJOR = LIB_VERSION_MAJOR;
48+
const int VERSION_MINOR = LIB_VERSION_MINOR;
49+
const int VERSION_PATCH = LIB_VERSION_PATCH;
50+
const std::string LIB_STRING_VERSION =
51+
BOOST_PP_STRINGIZE(LIB_VERSION_MAJOR) "."
52+
BOOST_PP_STRINGIZE(LIB_VERSION_MINOR) "."
53+
BOOST_PP_STRINGIZE(LIB_VERSION_PATCH);
4654

4755
}
4856

0 commit comments

Comments
 (0)