Milestone1

This commit is contained in:
Joey Yakimowich-Payne 2026-01-27 15:24:29 -07:00
commit 4addf989cc
17 changed files with 2876 additions and 0 deletions

107
CMakeLists.txt Normal file
View file

@ -0,0 +1,107 @@
cmake_minimum_required(VERSION 3.16)
project(potato-audio-router VERSION 1.0.0 LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
# Export compile commands for IDE support
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# Qt6 Components
find_package(Qt6 6.2 REQUIRED COMPONENTS
Core
Widgets
)
include(FetchContent)
FetchContent_Declare(
QtNodes
GIT_REPOSITORY https://github.com/paceholder/nodeeditor
GIT_TAG master
)
FetchContent_MakeAvailable(QtNodes)
# PipeWire
find_package(PkgConfig REQUIRED)
pkg_check_modules(PIPEWIRE REQUIRED libpipewire-0.3>=0.3.0)
pkg_check_modules(SPA REQUIRED libspa-0.2>=0.2)
# Compiler flags
add_compile_options(
-Wall
-Wextra
-Wpedantic
-Werror=return-type
)
# Include directories
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/src
${PIPEWIRE_INCLUDE_DIRS}
${SPA_INCLUDE_DIRS}
)
# Source files for core library
set(CORE_SOURCES
src/pipewire/pipewirecontroller.cpp
src/pipewire/nodeinfo.cpp
src/pipewire/portinfo.cpp
)
set(CORE_HEADERS
src/pipewire/pipewirecontroller.h
src/pipewire/nodeinfo.h
src/pipewire/portinfo.h
)
# Core library (shared between test app and future GUI app)
add_library(potato-core STATIC
${CORE_SOURCES}
${CORE_HEADERS}
)
target_link_libraries(potato-core PUBLIC
Qt6::Core
${PIPEWIRE_LIBRARIES}
${SPA_LIBRARIES}
)
target_include_directories(potato-core PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/src
${PIPEWIRE_INCLUDE_DIRS}
${SPA_INCLUDE_DIRS}
)
# CLI test application for Milestone 1
add_executable(potato-test
src/main_test.cpp
)
target_link_libraries(potato-test PRIVATE
potato-core
Qt6::Core
)
add_executable(potato-gui
src/main_gui.cpp
src/gui/GraphEditorWidget.cpp
src/gui/PipeWireGraphModel.cpp
)
target_link_libraries(potato-gui PRIVATE
potato-core
Qt6::Widgets
QtNodes
)
# Install
install(TARGETS potato-test
RUNTIME DESTINATION bin
)
install(TARGETS potato-gui
RUNTIME DESTINATION bin
)