Skip to content

Commit 44d2c74

Browse files
committed
WAM support
1 parent 678a688 commit 44d2c74

File tree

2 files changed

+29
-3
lines changed

2 files changed

+29
-3
lines changed

TemplateProject/CMakeLists.txt

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ function(iplug_add_plugin_resources target)
3434
endfunction()
3535

3636
# ============================================================================
37-
# macOS/Windows targets (not iOS)
37+
# macOS/Windows targets (not iOS, not Emscripten)
3838
# ============================================================================
39-
if(NOT IOS)
39+
if(NOT IOS AND NOT CMAKE_SYSTEM_NAME STREQUAL "Emscripten")
4040
# ============================================================================
4141
# APP Target (Standalone Application) - with IGraphics UI
4242
# ============================================================================
@@ -136,4 +136,30 @@ if(IOS)
136136

137137
# Embed AUv3 appex and framework in the iOS app
138138
iplug_embed_auv3ios_in_app(${PROJECT_NAME}-ios-app ${PROJECT_NAME})
139+
endif()
140+
141+
# ============================================================================
142+
# WAM/Web Targets (Emscripten only)
143+
# ============================================================================
144+
if(CMAKE_SYSTEM_NAME STREQUAL "Emscripten")
145+
# WAM Processor target (DSP/audio worklet)
146+
add_executable(${PROJECT_NAME}-wam ${SOURCE_FILES})
147+
iplug_add_target(${PROJECT_NAME}-wam PUBLIC
148+
LINK iPlug2::WAM _${PROJECT_NAME}-base
149+
)
150+
iplug_configure_target(${PROJECT_NAME}-wam WAM ${PROJECT_NAME})
151+
152+
# Web Controller target (UI/graphics)
153+
add_executable(${PROJECT_NAME}-web ${SOURCE_FILES})
154+
iplug_add_target(${PROJECT_NAME}-web PUBLIC
155+
LINK iPlug2::Web _${PROJECT_NAME}-base
156+
)
157+
iplug_configure_target(${PROJECT_NAME}-web Web ${PROJECT_NAME})
158+
159+
# Combined WAM distribution target (bundles resources, templates, etc.)
160+
iplug_build_wam_dist(${PROJECT_NAME}
161+
WAM_TARGET ${PROJECT_NAME}-wam
162+
WEB_TARGET ${PROJECT_NAME}-web
163+
SITE_ORIGIN "/"
164+
)
139165
endif()

0 commit comments

Comments
 (0)