sqlite-vec icon indicating copy to clipboard operation
sqlite-vec copied to clipboard

Add CMake

Open thesmartwon opened this issue 4 months ago • 0 comments

I'm interested in building your project on Windows. Would you be interested in replacing Makefile with CMakeLists.txt? If so, I could pick up the work.

As an aside, to build WASM on Linux, I had to add -I/usr/include to emcc:

 $(TARGET_WASM_LIB): examples/wasm/wasm.c sqlite-vec.c $(BUILD_DIR) $(WASM_DIR)
-       emcc -O3  -I./ -Ivendor -DSQLITE_CORE -c examples/wasm/wasm.c -o $(BUILD_DIR)/wasm.wasm.o
-       emcc -O3  -I./ -Ivendor -DSQLITE_CORE -c sqlite-vec.c -o $(BUILD_DIR)/sqlite-vec.wasm.o
+       emcc -O3  -I./ -Ivendor -I/usr/include -DSQLITE_CORE -c examples/wasm/wasm.c -o $(BUILD_DIR)/wasm.wasm.o
+       emcc -O3  -I./ -Ivendor -I/usr/include -DSQLITE_CORE -c sqlite-vec.c -o $(BUILD_DIR)/sqlite-vec.wasm.o
        emar rcs $@ $(BUILD_DIR)/wasm.wasm.o $(BUILD_DIR)/sqlite-vec.wasm.o

thesmartwon avatar Oct 11 '24 16:10 thesmartwon