Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ If you encounter any problems or have questions about this project, please open

`-DINTERFACE_TYPE=` is separate from `-DCONTROLLER=` and selects only which emulator is built. It defaults to `Archon`; `-DINTERFACE_TYPE=AstroCam` skips the emulator, since none is implemented for ARC.

To enable the shared-memory output (`SHM_ENABLED` in a `.cfg` file, see [Frame Outputs](#frame-outputs) below), add `-DENABLE_SHM_OUTPUT=ON -DImageStreamIO_DIR=<prefix>/lib/cmake`:
To enable the shared-memory output (`SHM_ENABLED` in a `.cfg` file, see [Frame Outputs](#frame-outputs) below), add `-DENABLE_SHM_OUTPUT=ON`:

```bash
$ cmake -DENABLE_SHM_OUTPUT=ON -DImageStreamIO_DIR=/usr/local/lib/cmake ..
$ cmake -DENABLE_SHM_OUTPUT=ON ..
```

This requires [ImageStreamIO](https://github.com/milk-org/ImageStreamIO) to already be built and installed, since it isn't packaged for common distros:
Expand All @@ -66,7 +66,7 @@ If you encounter any problems or have questions about this project, please open
$ sudo make install
```

ImageStreamIO's own `Config.cmake` files install directly under `<prefix>/lib/cmake/` rather than the CMake-conventional `<prefix>/lib/cmake/ImageStreamIO/`, so `-DImageStreamIO_DIR=...` must always be given explicitly, even for a standard system-wide install.
ImageStreamIO's own `Config.cmake` files install directly under `<prefix>/lib/cmake/` rather than the CMake-conventional `<prefix>/lib/cmake/ImageStreamIO/`. The build looks in `/usr/local/lib/cmake` for them; for any other prefix pass `-DImageStreamIO_DIR=<prefix>/lib/cmake`.

To build the Python module (see [Python Module](#python-module) below), add `-DBUILD_PYTHON_MODULE=ON`. It is off by default, so builds that don't want it never need pybind11. To install it into an environment rather than build it here, see [Installing with pip](#installing-with-pip) instead, which fetches pybind11 itself:

Expand Down
2 changes: 1 addition & 1 deletion docs/configuration/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ These are CMake options, fixed when the software is compiled, not `.cfg` keys.
|---|---|---|
| `CONTROLLER` | none, required | `archon` or `astrocam`. CMake errors out if unset. |
| `INTERFACE_TYPE` | `Archon` | Selects which emulator is built, independently of `CONTROLLER`. `AstroCam` builds none, since none exists for ARC. |
| `ENABLE_SHM_OUTPUT` | `OFF` | Build the ImageStreamIO shared-memory output. Also needs `-DImageStreamIO_DIR=<prefix>/lib/cmake`. |
| `ENABLE_SHM_OUTPUT` | `OFF` | Build the ImageStreamIO shared-memory output. Found in `/usr/local/lib/cmake`; pass `-DImageStreamIO_DIR=<prefix>/lib/cmake` for another prefix. |
| `BUILD_PYTHON_MODULE` | `OFF` | Build the `camera_interface` Python module. Needs pybind11 at compile time only. |
| `CMAKE_INSTALL_PREFIX` | `/usr/local` | Where `make install` puts binaries and the module |

Expand Down
4 changes: 3 additions & 1 deletion utils/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ add_library(network STATIC
target_link_libraries(network nlohmann_json::nlohmann_json)

if(ENABLE_SHM_OUTPUT)
find_package(ImageStreamIO CONFIG REQUIRED)
# Upstream installs its config straight into lib/cmake, which CMake does not
# search on its own
find_package(ImageStreamIO CONFIG REQUIRED PATHS /usr/local/lib/cmake)

add_library(shared_memory_writer STATIC
${PROJECT_UTILS_DIR}/shared_memory_writer.cpp
Expand Down
Loading