@@ -137,7 +137,28 @@ set(ENTROPY_C_API_HEADERS
137137 include /entropy/entropy_work_service.h
138138)
139139
140+ # VFS C API sources and headers
141+ set (ENTROPY_VFS_C_API_SOURCES
142+ src/entropy/entropy_vfs_types_c.cpp
143+ src/entropy/entropy_virtual_file_system_c.cpp
144+ src/entropy/entropy_file_handle_c.cpp
145+ src/entropy/entropy_directory_handle_c.cpp
146+ src/entropy/entropy_file_operation_handle_c.cpp
147+ src/entropy/entropy_write_batch_c.cpp
148+ )
149+
150+ set (ENTROPY_VFS_C_API_HEADERS
151+ include /entropy/entropy_vfs_types.h
152+ include /entropy/entropy_virtual_file_system.h
153+ include /entropy/entropy_file_handle.h
154+ include /entropy/entropy_directory_handle.h
155+ include /entropy/entropy_file_operation_handle.h
156+ include /entropy/entropy_write_batch.h
157+ )
158+
140159# Append to main lists
160+ list (APPEND ENTROPY_C_API_SOURCES ${ENTROPY_VFS_C_API_SOURCES} )
161+ list (APPEND ENTROPY_C_API_HEADERS ${ENTROPY_VFS_C_API_HEADERS} )
141162list (APPEND ENTROPY_CORE_SOURCES ${ENTROPY_C_API_SOURCES} )
142163list (APPEND ENTROPY_CORE_HEADERS ${ENTROPY_C_API_HEADERS} )
143164
@@ -211,6 +232,13 @@ set_property(TARGET ConcurrencyAPIExample PROPERTY LINKER_LANGUAGE CXX)
211232# Link core
212233target_link_libraries (ConcurrencyAPIExample PRIVATE EntropyCore)
213234
235+ # VFS C API example (pure C)
236+ add_executable (VFSCAPIExample Examples/VFSCAPIExample.c)
237+ # Ensure C++ linker is used (C target linking against C++ library)
238+ set_property (TARGET VFSCAPIExample PROPERTY LINKER_LANGUAGE CXX)
239+ # Link core
240+ target_link_libraries (VFSCAPIExample PRIVATE EntropyCore)
241+
214242add_executable (VirtualFileSystemExample Examples/VirtualFileSystemExample.cpp)
215243target_link_libraries (VirtualFileSystemExample PRIVATE EntropyCore)
216244# Avoid Windows min/max macro pollution
0 commit comments