File tree Expand file tree Collapse file tree 5 files changed +35
-23
lines changed Expand file tree Collapse file tree 5 files changed +35
-23
lines changed Original file line number Diff line number Diff line change 8383 working-directory : ice-demos/cpp
8484 run : |
8585 set -o pipefail
86+
87+ # No IceBT on macOS
88+ if [[ "$(uname)" == "Darwin" ]]; then
89+ rm -rf IceBT
90+ fi
91+
8692 find . -name CMakeLists.txt -type f | while IFS= read -r file; do
8793 dir=$(dirname "$file");
8894 cmake -B "$dir/build" -S "$dir" -DIce_DEBUG=ON
94100 timeout-minutes : 20
95101 working-directory : ice-demos/cpp
96102 run : |
103+ # No IceBT on Windows
104+ Remove-Item -Recurse -Force "IceBT"
105+
97106 Get-ChildItem -Recurse -Filter CMakeLists.txt | ForEach-Object {
98107 $dir = $_.DirectoryName
99108 cmake -B "$dir/build" -S "$dir" -DIce_DEBUG=ON
Original file line number Diff line number Diff line change 1+ cmake_minimum_required (VERSION 3.16)
2+
3+ project (icegrid_allocate CXX)
4+
5+ include (../../cmake/common.cmake)
6+
7+ if (NOT TARGET Ice::IceBT)
8+ message (FATAL_ERROR "IceBT is not available" )
9+ return ()
10+ endif ()
11+
12+ add_executable (app App.cpp Talk.ice)
13+ slice2cpp_generate(app)
14+ target_link_libraries (app Ice::Ice Ice::IceBT)
Original file line number Diff line number Diff line change 1+ # IceBT Talk
2+
13This demo shows how to use [ IceBT] [ 1 ] , the Bluetooth transport plug-in.
24The command-line program allows you to hold a peer-to-peer talk session
35with another device on Linux or Android.
46
5- To run the demo, just start the program :
7+ To build the demo, run :
68
9+ ``` shell
10+ cmake -B build -S .
11+ cmake --build build --config Release
712```
13+
14+ To run the demo, just start the program:
15+
16+ ``` shell
817talk
918```
1019
Original file line number Diff line number Diff line change @@ -11,27 +11,6 @@ if (NOT EXISTS ${Ice_HOME})
1111 message (FATAL_ERROR "The specified Ice_HOME directory does not exist: ${Ice_HOME} " )
1212endif ()
1313
14- # List of all available Ice components
15- set (Ice_AVAILABLE_COMPONENTS DataStorm Glacier2 Ice IceBox IceGrid IceStorm)
16-
17- # IceBT is only available on Linux
18- # TODO: Check for required dependency
19- if (UNIX AND NOT APPLE )
20- list (APPEND Ice_AVAILABLE_COMPONENTS IceBT)
21- endif ()
22-
23- # Ensure Ice is always in the components list
24- if (NOT "Ice" IN_LIST Ice_FIND_COMPONENTS)
25- list (APPEND Ice_FIND_COMPONENTS Ice)
26- endif ()
27-
28- # Ensure requested components are valid
29- foreach (component ${Ice_FIND_COMPONENTS} )
30- if (NOT component IN_LIST Ice_AVAILABLE_COMPONENTS)
31- message (FATAL_ERROR "Ice component '${component} ' not found. Available: ${Ice_AVAILABLE_COMPONENTS} " )
32- endif ()
33- endforeach ()
34-
3514if (NOT DEFINED Ice_ARCHITECTURE)
3615 if (CMAKE_LIBRARY_ARCHITECTURE )
3716 set (Ice_ARCHITECTURE ${CMAKE_LIBRARY_ARCHITECTURE} CACHE STRING "Library architecture" )
Original file line number Diff line number Diff line change @@ -7,4 +7,5 @@ find_package(Threads REQUIRED)
77
88set (Ice_DIR ${CMAKE_CURRENT_LIST_DIR} CACHE PATH "Path to Ice CMake configuration file" )
99
10- find_package (Ice REQUIRED CONFIG COMPONENTS DataStorm Glacier2 IceGrid IceBox IceStorm)
10+ # IceBT is an optional component as it is not available in all distributions.
11+ find_package (Ice REQUIRED CONFIG COMPONENTS Ice DataStorm Glacier2 IceGrid IceBox IceStorm OPTIONAL_COMPONENTS IceBT)
You can’t perform that action at this time.
0 commit comments