Skip to content
Merged
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
4 changes: 1 addition & 3 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -516,9 +516,7 @@ jobs:
-B "${{ env.RUNNER_WORKSPACE }}/build-my-nmos-node" \
"${generator_args[@]}" \
-DCMAKE_FIND_PACKAGE_PREFER_CONFIG=1 \
-DCMAKE_MODULE_PATH="${{ env.CMAKE_WORKSPACE }}/build/conan" \
-DCMAKE_PREFIX_PATH="${{ env.CMAKE_WORKSPACE }}/install" \
-DCMAKE_INSTALL_PREFIX="${{ env.CMAKE_WORKSPACE }}/build/conan"
-DCMAKE_PREFIX_PATH="${{ env.CMAKE_WORKSPACE }}/install;${{ env.CMAKE_WORKSPACE }}/build/conan"
cmake --build "${{ env.RUNNER_WORKSPACE }}/build-my-nmos-node"${{ matrix.vs_generator && ' --config Release' || '' }}

- name: install test log
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/src/install-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
-B "${{ env.RUNNER_WORKSPACE }}/build-my-nmos-node" \
"${generator_args[@]}" \
-DCMAKE_FIND_PACKAGE_PREFER_CONFIG=1 \
-DCMAKE_MODULE_PATH="${{ env.CMAKE_WORKSPACE }}/build/conan" \
-DCMAKE_PREFIX_PATH="${{ env.CMAKE_WORKSPACE }}/install" \
-DCMAKE_INSTALL_PREFIX="${{ env.CMAKE_WORKSPACE }}/build/conan"
-DCMAKE_PREFIX_PATH="${{ env.CMAKE_WORKSPACE }}/install;${{ env.CMAKE_WORKSPACE }}/build/conan"
cmake --build "${{ env.RUNNER_WORKSPACE }}/build-my-nmos-node"${{ matrix.vs_generator && ' --config Release' || '' }}

- name: install test log
Expand Down
10 changes: 10 additions & 0 deletions Documents/Getting-Started.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,16 @@ add_executable(my-nmos-node main.cpp)
target_link_libraries(my-nmos-node nmos-cpp::nmos-cpp)
```

If nmos-cpp was built using Conan, CMake has to find the config files that Conan generated for nmos-cpp's dependencies when it configures the other project. Add `<home-dir>/nmos-cpp/Development/build/conan` to `CMAKE_PREFIX_PATH`, so that CMake searches it before the system directories, and set `CMAKE_FIND_PACKAGE_PREFER_CONFIG`, so that CMake uses those config files rather than its own find modules.

For example:

```sh
cmake .. \
-DCMAKE_PREFIX_PATH:PATH="<home-dir>/nmos-cpp/Development/build/conan" \
-DCMAKE_FIND_PACKAGE_PREFER_CONFIG:BOOL="1"
```

For a complete example, see [Sandbox/my-nmos-node](../Sandbox/my-nmos-node).

## What Next?
Expand Down
Loading