Skip to content

Commit

Permalink
Update changelog and versions for first release
Browse files Browse the repository at this point in the history
  • Loading branch information
pollastri-pierre committed May 14, 2018
1 parent ef97696 commit 96f04d3
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Changelog
0.9.0 (2018-05-14)
==================

First beta release of libledger-core for Ledger Vault integration
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ include(UseBackportedModules)

# The project version number.
set(VERSION_MAJOR 0 CACHE STRING "Project major version number.")
set(VERSION_MINOR 0 CACHE STRING "Project minor version number.")
set(VERSION_PATCH 1 CACHE STRING "Project patch version number.")
set(VERSION_MINOR 9 CACHE STRING "Project minor version number.")
set(VERSION_PATCH 0 CACHE STRING "Project patch version number.")
mark_as_advanced(VERSION_MAJOR VERSION_MINOR VERSION_PATCH)

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY build)
Expand Down
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ git clone --recurse-submodules https://github.com/LedgerHQ/lib-ledger-core.git
## Dependencies

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

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

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

### Building for JNI

Building with JNI (Java Native Interface), allows you to use the library with Java based software. In order to enable JNI mode use
```
cmake -DTARGET_JNI=ON
```

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)

## Binding to node JS

Generate binding (under `build/Release/ledgerapp_nodejs.node`):
Expand Down
3 changes: 3 additions & 0 deletions core/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -265,5 +265,8 @@ target_include_directories(ledger-core PUBLIC ../lib/cereal/)
target_include_directories(ledger-core PUBLIC ../lib/date/)
target_include_directories(ledger-core PUBLIC ../lib/secp256k1)

target_compile_definitions(ledger-core PRIVATE LIB_VERSION_MAJOR=${VERSION_MAJOR} LIB_VERSION_MINOR=${VERSION_MINOR}
LIB_VERSION_PATCH=${VERSION_PATCH})

install(TARGETS ledger-core DESTINATION "lib")
install(FILES ${LEDGER_CORE_API_HEADERS} DESTINATION "include/ledger-core")
12 changes: 10 additions & 2 deletions core/src/ledger-core.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
#ifndef LEDGER_CORE_LEDGER_CORE_H
#define LEDGER_CORE_LEDGER_CORE_H

#include <boost/preprocessor.hpp>

/**
* Ledger root namespace
*/
Expand All @@ -41,8 +43,14 @@ namespace ledger {
*/
namespace core {

const int LIB_VERSION = 1;
const std::string LIB_STRING_VERSION = "1.0.0";
const int LIB_VERSION = LIB_VERSION_MAJOR << 16 | LIB_VERSION_MINOR << 8 | LIB_VERSION_PATCH;
const int VERSION_MAJOR = LIB_VERSION_MAJOR;
const int VERSION_MINOR = LIB_VERSION_MINOR;
const int VERSION_PATCH = LIB_VERSION_PATCH;
const std::string LIB_STRING_VERSION =
BOOST_PP_STRINGIZE(LIB_VERSION_MAJOR) "."
BOOST_PP_STRINGIZE(LIB_VERSION_MINOR) "."
BOOST_PP_STRINGIZE(LIB_VERSION_PATCH);

}

Expand Down

0 comments on commit 96f04d3

Please sign in to comment.