@@ -157,46 +157,40 @@ function(vix_note_append_if_exists out_var path_value)
157157endfunction ()
158158
159159# ============================================================================
160- # Reply module
161- # - ReplyCellRunner depends on vix::reply.
162- # - Same style as CLI:
163- # 1) use target already created by umbrella
164- # 2) use local sibling module ../reply
165- # 3) fallback to installed package
160+ # Reply runtime implementation
161+ # - Reply is used internally by Note's ReplyCellRunner.
162+ # - It is not part of the Vix umbrella export.
163+ # - Therefore we embed Reply sources into vix_note instead of exporting a
164+ # vix::reply dependency through VixTargets.
166165# ============================================================================
167166
168167get_filename_component (_VIX_NOTE_MODULES_DIR "${CMAKE_CURRENT_SOURCE_DIR } /.." ABSOLUTE )
169168
170169set (_VIX_REPLY_DIR "${_VIX_NOTE_MODULES_DIR} /reply" )
171170
172- if (NOT TARGET vix::reply AND NOT TARGET vix::vix_reply)
173- if (EXISTS "${_VIX_REPLY_DIR} /CMakeLists.txt" )
174- message (STATUS "[note] Building inside Vix repo -> resolving local reply module" )
171+ if (EXISTS "${_VIX_REPLY_DIR} /CMakeLists.txt" )
172+ message (STATUS "[note] Embedding local reply runtime from ${_VIX_REPLY_DIR} " )
175173
176- set (VIX_REPLY_BUILD_TESTS OFF CACHE BOOL "Build Vix Reply tests" FORCE )
177- set (VIX_REPLY_BUILD_EXAMPLES OFF CACHE BOOL "Build Vix Reply examples" FORCE )
174+ file (GLOB_RECURSE VIX_NOTE_REPLY_SOURCES
175+ CONFIGURE_DEPENDS
176+ "${_VIX_REPLY_DIR} /src/*.cpp"
177+ )
178178
179- add_subdirectory ("${_VIX_REPLY_DIR} " "${CMAKE_BINARY_DIR } /_vix_reply" )
180- else ()
181- message (STATUS "[note] Local reply module not found -> trying installed package" )
179+ target_sources (vix_note PRIVATE ${VIX_NOTE_REPLY_SOURCES} )
182180
183- find_package (vix_reply CONFIG QUIET )
184- endif ()
185- endif ()
181+ target_include_directories (vix_note
182+ PRIVATE
183+ "${_VIX_REPLY_DIR} /include"
184+ )
186185
187- if (TARGET vix::reply)
188- message (STATUS "[note] Reply runtime enabled" )
189- target_link_libraries (vix_note PUBLIC vix::reply )
190- elseif (TARGET vix::vix_reply)
191- message (STATUS "[note] Reply runtime enabled" )
192- target_link_libraries (vix_note PUBLIC vix::vix_reply )
186+ target_compile_definitions (vix_note
187+ PRIVATE
188+ VIX_NOTE_HAS_REPLY=1
189+ )
193190else ()
194191 message (FATAL_ERROR
195192 "Missing dependency for vix_note.\n "
196- "Expected one of:\n "
197- " - umbrella target vix::reply\n "
198- " - local sibling module in ../reply\n "
199- " - installed package providing vix::reply or vix::vix_reply"
193+ "Expected local sibling module in ../reply because Note uses ReplyCellRunner."
200194 )
201195endif ()
202196
0 commit comments