mirror of
https://github.com/EvernodeXRPL/hpcore.git
synced 2026-04-29 15:37:59 +00:00
Added cmake for builds.
This commit is contained in:
6
.gitignore
vendored
6
.gitignore
vendored
@@ -4,4 +4,8 @@
|
||||
.*.sw?
|
||||
.DS_Store
|
||||
build/**
|
||||
.vscode/**
|
||||
.vscode/**
|
||||
Makefile
|
||||
CMakeCache.txt
|
||||
cmake_install.cmake
|
||||
CMakeFiles/**
|
||||
21
CMakeLists.txt
Normal file
21
CMakeLists.txt
Normal file
@@ -0,0 +1,21 @@
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
add_definitions("-std=c++17")
|
||||
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY build)
|
||||
|
||||
add_executable(hpcore
|
||||
src/main.cpp
|
||||
src/conf.cpp
|
||||
src/crypto.cpp
|
||||
src/proc.cpp
|
||||
src/shared.cpp
|
||||
src/usr/usr.cpp
|
||||
src/shared.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(hpcore
|
||||
libsodium.a
|
||||
libboost_system.a
|
||||
libboost_filesystem.a
|
||||
)
|
||||
15
README.md
15
README.md
@@ -40,13 +40,18 @@ Following Instructions are based on Boost [getting started](https://www.boost.or
|
||||
|
||||
This will update your library cache and avoid potential issues when running your compiled C++ program which links to newly installed libraries.
|
||||
|
||||
#### Install CMAKE
|
||||
If you use apt, run `sudo apt install cmake`
|
||||
Or follow [this](https://cmake.org/install/)
|
||||
|
||||
#### Build and run Hot Pocket
|
||||
1. navigate to hotpocket repo root.
|
||||
2. Run `make`
|
||||
3. Run `./build/hpcore new ~/mycontract`. This will initialize a new contract directory `mycontract` in your home directory.
|
||||
4. Take a look at `~/mycontract/cfg/hp.cfg`. This is your new contract config file. You can modify it according to your contract hosting requirements.
|
||||
5. Optional: Run `./build/hpcore rekey ~/mycontract` to generate new public/private key pair.
|
||||
6. Run `./build/hpcore run ~/mycontract` to run your smart contract (to do).
|
||||
1. Run `cmake .` (You only have to do this once)
|
||||
1. Run `make`
|
||||
1. Run `./build/hpcore new ~/mycontract`. This will initialize a new contract directory `mycontract` in your home directory.
|
||||
1. Take a look at `~/mycontract/cfg/hp.cfg`. This is your new contract config file. You can modify it according to your contract hosting requirements.
|
||||
1. Optional: Run `./build/hpcore rekey ~/mycontract` to generate new public/private key pair.
|
||||
1. Run `./build/hpcore run ~/mycontract` to run your smart contract (to do).
|
||||
|
||||
## Code structure
|
||||
Code is divided into subsystems via namespaces. Some subsystems mentioned here are yet to be introduced.
|
||||
|
||||
Reference in New Issue
Block a user