packaging/arch/PKGBUILD builds the tagged release from this repository and installs it with pacman; the version test keeps its pkgver in step with CMakeLists.txt. A desktop entry puts the interface in the app menu. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
26 lines
1.3 KiB
CMake
26 lines
1.3 KiB
CMake
# The CLI parser joins the core here: it is GUI-free too, and the canvas size
|
|
# it produces has to obey the same bounds a project file does.
|
|
add_executable(effector_tests core_tests.cpp ../src/cli/options.cpp)
|
|
target_link_libraries(effector_tests PRIVATE effector_core)
|
|
target_compile_options(effector_tests PRIVATE -Wall -Wextra -Wpedantic)
|
|
# The version test reads the Arch PKGBUILD to keep its pkgver in step.
|
|
target_compile_definitions(effector_tests PRIVATE EFFECTOR_SOURCE_DIR="${PROJECT_SOURCE_DIR}")
|
|
|
|
add_test(NAME core COMMAND effector_tests)
|
|
|
|
# The interface drives the real window, so it needs a display. Under ctest it
|
|
# gets a private Xvfb one when xvfb-run is installed; without it, or without a
|
|
# display of its own, the test reports itself skipped rather than failed.
|
|
add_executable(effector_gui_tests gui_tests.cpp)
|
|
target_link_libraries(effector_gui_tests PRIVATE effector_gui)
|
|
target_compile_options(effector_gui_tests PRIVATE -Wall -Wextra -Wpedantic)
|
|
|
|
find_program(XVFB_RUN xvfb-run)
|
|
if(XVFB_RUN)
|
|
add_test(NAME gui COMMAND ${XVFB_RUN} -a -s "-screen 0 1400x900x24"
|
|
env -u WAYLAND_DISPLAY GDK_BACKEND=x11 $<TARGET_FILE:effector_gui_tests>)
|
|
else()
|
|
add_test(NAME gui COMMAND effector_gui_tests)
|
|
endif()
|
|
set_tests_properties(gui PROPERTIES SKIP_RETURN_CODE 77)
|