Skip to content

Commit

Permalink
fix build issues
Browse files Browse the repository at this point in the history
Signed-off-by: Miaofei <[email protected]>
  • Loading branch information
mm318 committed Aug 29, 2023
1 parent c8b4bf0 commit cacde65
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 6 deletions.
14 changes: 12 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,12 @@ set(${APP_NAME}_SOURCE_FILES
find_package(PkgConfig)
pkg_check_modules(GLIB REQUIRED glib-2.0)
pkg_check_modules(GSTREAMER REQUIRED gstreamer-1.0)
pkg_check_modules(GSTREAMER_APP REQUIRED gstreamer-app-1.0)
pkg_check_modules(GSTREAMER_VIDEO REQUIRED gstreamer-video-1.0)
pkg_check_modules(CAIRO REQUIRED cairo)

add_definitions(-DBOOST_ERROR_CODE_HEADER_ONLY)

ExternalProject_Add(armadillo
SOURCE_DIR "${CMAKE_SOURCE_DIR}/external_libs/armadillo-9.200.5"
CONFIGURE_COMMAND ""
Expand Down Expand Up @@ -98,16 +102,22 @@ target_link_libraries(${APP_NAME}
glut
glfw
openal
libPocoUtil.a
libPocoFoundation.a
sndfile
kiss
tess2
PocoUtil
PocoFoundation
fontconfig
freetype
freeimage
X11
${GSTREAMER_LIBRARIES}
${GSTREAMER_APP_LIBRARIES}
${GSTREAMER_VIDEO_LIBRARIES}
${CAIRO_LIBRARIES}
${GLIB_LIBRARIES}
uriparser
curl
boost_filesystem
boost_system
pthread
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Visualization (implemented using openFrameworks) is also addded.

```bash
git clone https://github.com/mm318/mrg-cpp.git
cd mrg-cpp
cd mrg-cpp/
```

- Setup openFrameworks 0.11.2 and its CMake build:
Expand All @@ -29,7 +29,7 @@ sudo external_libs/of_v0.11.2_linux64gcc6_release/scripts/linux/ubuntu/install_d

```bash
mkdir build
cd build
cd build/
cmake ..
make -j4
```
Expand All @@ -38,15 +38,16 @@ make -j4
## Usage

```
mrg_axon_model [--record-video=<video name>] <axon file> <V_fe (mV)> <V_applied (mV)> <duration (ms)> <stim start (ms)> <stim end (ms)>
mrg_axon_model <axon file> <V_fe (mV)> <V_applied (mV)> <duration (ms)> <stim start (ms)> <stim end (ms)>
```

The axon file is in the format (tab separated): `<x (m)> <y (m)> <z (m)> <Ve_pulse (V)>`

### Example

```bash
mrg_axon_model reference/activateF.txt --record-video=replay 1 3 3 2 2.5
cd build/bin/
./mrg_axon_model activateF.txt 1 3 3 2 2.5
```

![Example visualization](reference/example_screenshot.png "Example visualization")
Expand Down
4 changes: 4 additions & 0 deletions external_libs/install_openframeworks.cmake
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
cmake_minimum_required(VERSION 3.6)

include(GNUInstallDirs)

file(GLOB_RECURSE of_libs
LIST_DIRECTORIES false
${SRC_PREFIX}/*.a)

list(FILTER of_libs EXCLUDE REGEX "/emscripten/")

file(GLOB_RECURSE of_includes
LIST_DIRECTORIES false
${SRC_PREFIX}/libs/openFrameworks/of*.h)
Expand Down

0 comments on commit cacde65

Please sign in to comment.