Skip to content

Commit

Permalink
Fix building conan pkg from source (#2)
Browse files Browse the repository at this point in the history
* fix building conan pkg from source

* update CHANGELOG
  • Loading branch information
atimin committed Aug 10, 2022
1 parent 43c4d9d commit cabfebb
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
19 changes: 16 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
## Release 0.2.0 (in progress)
# Changelog

## Release 0.1.0 (2022-06-28)
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased

### Fixed:

- Building conan pkg from source, [PR-2](https://github.com/panda-official/DriftProtocol/pull/2)



## 0.1.0 - 2022-06-28

### Added

* DRIFT-492: Port to Github, [PR-1](https://github.com/panda-official/DriftProtocol/pull/1)
- DRIFT-492: Port to Github, [PR-1](https://github.com/panda-official/DriftProtocol/pull/1)
7 changes: 4 additions & 3 deletions cpp/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,20 @@ def source(self):
local_source = os.getenv("CONAN_SOURCE_DIR")
if local_source is not None:
self.run(
"cp %s -r %s" % (os.getenv("CONAN_SOURCE_DIR"), self.source_folder)
"cp %s -r %s"
% (os.getenv("CONAN_SOURCE_DIR"), f"{self.source_folder}/{self.name}")
)
else:
branch = f"v{self.version}" if self.channel == "stable" else self.channel
self.run(
f"git clone --branch={branch}"
" https://github.com/panda-official/DriftProtocol.git drift_protocol"
f" https://github.com/panda-official/DriftProtocol.git {self.name}"
)

def build(self):
cmake = CMake(self)
self.run(
"cmake -DCMAKE_BUILD_TYPE=Release %s/cpp %s"
"cmake -DCMAKE_BUILD_TYPE=Release %s/drift_protocol/cpp %s"
% (self.source_folder, cmake.command_line)
)
self.run("cmake --build . -- -j")
Expand Down

0 comments on commit cabfebb

Please sign in to comment.