Files
effector/CMakeLists.txt
T
SiandClaude Opus 5.5 5a5cea69db Split the sidebar into Chain and Setup tabs, with a draggable chain list
The sidebar grew crowded as the chain got longer. The chain and the params
of the selected stage now share a Chain tab through a vertical split the
user drags, and the sources, canvas and seed move to a Setup tab. Stage
rows are compact, with their move and remove buttons shown only on the
hovered, selected or focused row.

Add effect had stopped opening: its menu of fifteen effects no longer fit
below the button, and GTK does not show a popover that does not fit. The
menu now scrolls past 480 pixels, and the button sits beside the chain
heading, where the split cannot push it down the screen.

The window code becomes an effector_gui library so a new GUI test binary
can drive the real window under Xvfb; ctest skips it when xvfb-run is
missing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-23 21:26:42 +02:00

78 lines
2.6 KiB
CMake

cmake_minimum_required(VERSION 3.20)
project(effector VERSION 0.1.0 LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type" FORCE)
endif()
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG")
find_package(PkgConfig REQUIRED)
pkg_check_modules(GTKMM REQUIRED IMPORTED_TARGET gtkmm-4.0)
pkg_check_modules(GDKPIXBUF REQUIRED IMPORTED_TARGET gdk-pixbuf-2.0)
# Pango and Cairo draw the text effect's glyphs. Neither needs a display, so
# the core stays headless.
pkg_check_modules(PANGOCAIRO REQUIRED IMPORTED_TARGET pangocairo)
find_package(Threads REQUIRED)
# --- core: effects and image handling, no GUI ---------------------------------
add_library(effector_core STATIC
src/core/canvas.cpp
src/core/chain.cpp
src/core/effect.cpp
src/core/image.cpp
src/core/params.cpp
src/core/project.cpp
src/core/registry.cpp
src/core/rng.cpp
src/core/style.cpp
src/effects/bitcrush.cpp
src/effects/blur.cpp
src/effects/channelsplit.cpp
src/effects/corrupt.cpp
src/effects/feedback.cpp
src/effects/grain.cpp
src/effects/monochrome.cpp
src/effects/overlay.cpp
src/effects/pixelsort.cpp
src/effects/scanlines.cpp
src/effects/shatter.cpp
src/effects/slitshift.cpp
src/effects/text.cpp
src/effects/tiles.cpp
src/effects/warp.cpp
)
target_include_directories(effector_core PUBLIC src)
# The core is GUI-free: it only needs gdk-pixbuf for decoding and encoding,
# so headless rendering works without a display.
target_link_libraries(effector_core PUBLIC PkgConfig::GDKPIXBUF PkgConfig::PANGOCAIRO Threads::Threads)
target_compile_options(effector_core PRIVATE -Wall -Wextra -Wpedantic)
# --- interface: the GTK window, split out so the GUI tests can link it --------
add_library(effector_gui STATIC
src/cli/options.cpp
src/gui/app.cpp
src/gui/window.cpp
)
target_link_libraries(effector_gui PUBLIC effector_core PkgConfig::GTKMM)
target_compile_options(effector_gui PRIVATE -Wall -Wextra -Wpedantic)
# --- application --------------------------------------------------------------
add_executable(effector src/main.cpp)
target_link_libraries(effector PRIVATE effector_gui)
target_compile_options(effector PRIVATE -Wall -Wextra -Wpedantic)
install(TARGETS effector RUNTIME DESTINATION bin)
# --- tests --------------------------------------------------------------------
include(CTest)
if(BUILD_TESTING)
add_subdirectory(tests)
endif()