Merge dev (M5 bank_panel) into view-shell branch
# Conflicts: # CMakeLists.txt
This commit is contained in:
+39
-6
@@ -37,7 +37,16 @@ add_library(capture_paths STATIC src/capture_paths.cpp)
|
||||
target_include_directories(capture_paths PUBLIC src)
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# 2c) Pure view_mode_model library — NO REAPER, NO SWELL. The Design View heart
|
||||
# 2c) Pure bank-grid layout — NO REAPER, NO SWELL. Grid tiling math (panel WxH +
|
||||
# cell size + N -> cell rects, wrapping, partial last row) and the thumbnail
|
||||
# cache key for the docked bank_panel (M5). Split out so the layout logic is
|
||||
# unit-tested outside the DAW; the panel shell (SWELL/LICE/PCM) is DAW-verified.
|
||||
# ---------------------------------------------------------------------------
|
||||
add_library(bank_grid STATIC src/bank_grid.cpp)
|
||||
target_include_directories(bank_grid PUBLIC src)
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# 2d) Pure view_mode_model library — NO REAPER, NO SWELL. The Design View heart
|
||||
# (Phase D1): mode registry + GUID-keyed membership index + folder-tree-aware
|
||||
# visibility derivation + parking/restore planner + JSON round-trip. Mirror of
|
||||
# bank_model; the folder tree is an INPUT supplied by the D2 shell.
|
||||
@@ -72,6 +81,10 @@ add_executable(capture_paths_tests tests/test_capture_paths.cpp)
|
||||
target_link_libraries(capture_paths_tests PRIVATE capture_paths)
|
||||
add_test(NAME capture_paths_tests COMMAND capture_paths_tests)
|
||||
|
||||
add_executable(bank_grid_tests tests/test_bank_grid.cpp)
|
||||
target_link_libraries(bank_grid_tests PRIVATE bank_grid)
|
||||
add_test(NAME bank_grid_tests COMMAND bank_grid_tests)
|
||||
|
||||
add_executable(view_mode_model_tests tests/test_view_mode_model.cpp)
|
||||
target_link_libraries(view_mode_model_tests PRIVATE view_mode_model)
|
||||
add_test(NAME view_mode_model_tests COMMAND view_mode_model_tests)
|
||||
@@ -83,21 +96,35 @@ add_test(NAME view_tree_tests COMMAND view_tree_tests)
|
||||
# ---------------------------------------------------------------------------
|
||||
# 4) The REAPER extension — a loadable module (dlopen'd by REAPER, not linked).
|
||||
# ---------------------------------------------------------------------------
|
||||
# LICE sources the bank_panel draws with: lice.cpp (LICE_SysBitmap, FillRect,
|
||||
# Clear, Blit) + lice_line.cpp (Line, DrawRect). lice_line.cpp's bezier helpers
|
||||
# call LICE_FillCircle from lice_arc.cpp, so that TU is required to link even
|
||||
# though the panel draws no arcs. LICE routes GDI through native Win32 or, on
|
||||
# mac/linux, the host SWELL (SWELL_PROVIDED_BY_APP).
|
||||
set(LICE_SRC
|
||||
${WDL_INC}/lice/lice.cpp
|
||||
${WDL_INC}/lice/lice_line.cpp
|
||||
${WDL_INC}/lice/lice_arc.cpp
|
||||
)
|
||||
|
||||
add_library(reaper_reasampler MODULE
|
||||
src/main.cpp
|
||||
src/capture.cpp
|
||||
src/persist.cpp
|
||||
src/bank_panel.cpp
|
||||
${LICE_SRC}
|
||||
src/view_mode_model.cpp
|
||||
src/view_tree.cpp
|
||||
src/view.cpp
|
||||
)
|
||||
target_link_libraries(reaper_reasampler PRIVATE bank_model capture_paths)
|
||||
target_link_libraries(reaper_reasampler PRIVATE bank_model capture_paths peaks bank_grid view_mode_model)
|
||||
target_include_directories(reaper_reasampler PRIVATE ${SDK_INC} ${WDL_INC})
|
||||
set_target_properties(reaper_reasampler PROPERTIES PREFIX "" OUTPUT_NAME "reaper_reasampler")
|
||||
|
||||
if(WIN32)
|
||||
# Native Win32. REAPER provides nothing extra to link.
|
||||
# Dialog resources return with the docked bank_panel (Milestone 5).
|
||||
# Native Win32. REAPER provides nothing extra to link. The bank_panel dialog
|
||||
# template (M5) is compiled from src/resource.rc by the platform RC compiler.
|
||||
target_sources(reaper_reasampler PRIVATE src/resource.rc)
|
||||
|
||||
elseif(APPLE)
|
||||
# macOS: use REAPER's OWN SWELL at runtime via the modstub.
|
||||
@@ -106,7 +133,10 @@ elseif(APPLE)
|
||||
target_compile_definitions(reaper_reasampler PRIVATE SWELL_PROVIDED_BY_APP)
|
||||
target_link_libraries(reaper_reasampler PRIVATE "-framework AppKit")
|
||||
set_target_properties(reaper_reasampler PROPERTIES SUFFIX ".dylib")
|
||||
# Dialog: run SWELL resgen once (see README) and add the generated source.
|
||||
# bank_panel dialog (M5): SWELL can't read a Win32 .rc directly. Run resgen
|
||||
# once to turn src/resource.rc into a C++ source, then add it here:
|
||||
# php ${WDL_INC}/swell/mac_resgen.php src/resource.rc
|
||||
# target_sources(reaper_reasampler PRIVATE src/resource.rc_mac_dlg.h) # generated
|
||||
|
||||
else()
|
||||
# Linux: REAPER's libSwell.so is used at runtime via the generic modstub.
|
||||
@@ -114,5 +144,8 @@ else()
|
||||
target_sources(reaper_reasampler PRIVATE ${SWELL}/swell-modstub-generic.cpp)
|
||||
target_compile_definitions(reaper_reasampler PRIVATE SWELL_PROVIDED_BY_APP)
|
||||
set_target_properties(reaper_reasampler PROPERTIES SUFFIX ".so")
|
||||
# Dialog: run SWELL resgen once (see README) and add the generated source.
|
||||
# bank_panel dialog (M5): reuse the macOS resgen output (see README /
|
||||
# CLAUDE.md §SWELL dialog resources), then add the generated source:
|
||||
# php ${WDL_INC}/swell/mac_resgen.php src/resource.rc
|
||||
# target_sources(reaper_reasampler PRIVATE src/resource.rc_mac_dlg.h) # generated
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user