Codebase list libsdl2-mixer / a53c5e0
d/tests: Exercise a CMake build Simon McVittie 1 year, 10 months ago
2 changed file(s) with 13 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
22 Depends:
33 alsa-utils,
44 build-essential,
5 cmake,
56 libsdl2-mixer-dev,
7 ninja-build,
68 pkg-config,
79 xauth,
810 xvfb,
2727
2828 cp playmus.c "$WORKDIR"
2929 cp playwave.c "$WORKDIR"
30 mkdir "$WORKDIR/cmake"
31 cp ./cmake/test/CMakeLists.txt "$WORKDIR/cmake"
32 cp ./cmake/test/main.c "$WORKDIR/cmake"
3033
3134 cd "$WORKDIR"
3235
4144 # This audio file is shipped in the alsa-utils package
4245 "$@" ./playmus /usr/share/sounds/alsa/Front_Center.wav
4346 "$@" ./playwave /usr/share/sounds/alsa/Front_Center.wav
47
48 if [ -z "${DEB_HOST_GNU_TYPE:-}" ]; then
49 mkdir cmake/_build
50 # TODO: Static linking doesn't work yet
51 ( cd cmake/_build; cmake -GNinja -DTEST_SHARED=ON -DTEST_STATIC=OFF .. )
52 ninja -C cmake/_build
53 ./cmake/_build/main_shared
54 fi