Skip to content

Commit

Permalink
Readme update
Browse files Browse the repository at this point in the history
  • Loading branch information
Hauke Jürgen Mönck committed Feb 13, 2018
1 parent 8a1711e commit b012810
Showing 1 changed file with 12 additions and 53 deletions.
65 changes: 12 additions & 53 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,62 +2,21 @@

This repository showcases how you can implement a new tracking algorithm for BioTracker.

Just fork this repository and you're ready to go.

Please note that tracking algorithms are only certain to work with BioTracker if they are compiled
with the same compiler using the same C++ standard library.

## Manual setup

### CMake config

We use CMake in combination with the CPM package manager for our projects.

Initialization of CPM in CMakeLists.txt
```CMake
set(CPM_DIR "${CMAKE_CURRENT_BINARY_DIR}/cpm_packages" CACHE TYPE STRING)
find_package(Git)
if(NOT GIT_FOUND)
message(FATAL_ERROR "CPM requires Git.")
endif()
if (NOT EXISTS ${CPM_DIR}/CPM.cmake)
message(STATUS "Cloning repo (https://github.com/iauns/cpm)")
execute_process(
COMMAND "${GIT_EXECUTABLE}" clone https://github.com/iauns/cpm ${CPM_DIR}
RESULT_VARIABLE error_code
OUTPUT_QUIET ERROR_QUIET)
if(error_code)
message(FATAL_ERROR "CPM failed to get the hash for HEAD")
endif()
endif()
include(${CPM_DIR}/CPM.cmake)
```

Now you can use our shared c++ compilation settings and add the BioTracker Core as a CPM dependency.
```CMake
if(NOT DEFINED CMAKECONFIG_PATH)
CPM_AddModule("cmakeconfig"
GIT_REPOSITORY "https://github.com/BioroboticsLab/cmakeconfig.git"
GIT_TAG "master")
else()
CPM_AddModule("cmakeconfig"
SOURCE_DIR "${CMAKECONFIG_PATH}")
endif()
include_biotracker_core("master")
CPM_Finish()
biorobotics_config()
```
## Building on Windows

### Registration
```C++
extern "C" {
void registerTracker() {
BioTracker::Core::Registry::getInstance().registerTrackerType<SampleTracker>("SampleTracker");
}
}
```
Configuring without rebuilding the BioTracker:
- Download and extract the latest Biotracker and library from https://github.com/BioroboticsLab/biotracker_core/releases
- Clone or fork the sampletracker and configure using CMake
- Building requires the same dependencies as the BioTracker. They are toolchained exactly like the BioTracker, see corresponding readme.
- In CMake, set variable "BTLibrary" to the the path you extracted the library to. Alternatively, set your path enviromental variable correctly.
- Configure & Build
- Run Biotracker and load generated DLL

## Building on Linux

Toolchain is windows-specific and needs adjustment for linux convinience.
Build the BioTracker from source and add generated libraries to the binary folder of the release download.
Otherwise do as in the windows guide.

0 comments on commit b012810

Please sign in to comment.