Codebase list libsdl2-net / fe47f66
d/tests: Exercise CMake build Simon McVittie 1 year, 7 months ago
2 changed file(s) with 13 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
11 Restrictions: allow-stderr, superficial
22 Depends:
33 build-essential,
4 cmake,
45 libsdl2-net-dev,
6 ninja-build,
57 pkg-config,
68 xauth,
79 xvfb,
1818 fi
1919
2020 cp showinterfaces.c "$WORKDIR"
21 mkdir "$WORKDIR/cmake"
22 cp ./cmake/test/CMakeLists.txt "$WORKDIR/cmake"
23 cp ./cmake/test/main.c "$WORKDIR/cmake"
2124
2225 cd "$WORKDIR"
2326
2528 # shellcheck disable=SC2046
2629 "${CROSS_COMPILE}gcc" -oshowinterfaces showinterfaces.c $("${CROSS_COMPILE}pkg-config" --cflags --libs SDL2_net)
2730 xvfb-run -a ./showinterfaces
31
32 if [ -z "${DEB_HOST_GNU_TYPE:-}" ]; then
33 mkdir cmake/_build
34 ( cd cmake/_build; cmake -GNinja -DTEST_SHARED=ON -DTEST_STATIC=ON .. )
35 ninja -C cmake/_build
36 ./cmake/_build/main_shared
37 ./cmake/_build/main_static
38 fi