Skip to content

Commit

Permalink
Switch to cmake-fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
kasperisager committed Jan 4, 2025
1 parent 530ebfd commit 6fdb2c7
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 274,098 deletions.
19 changes: 16 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,27 @@ cmake_minimum_required(VERSION 3.25)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)

find_package(cmake-bare REQUIRED PATHS node_modules/cmake-bare)
find_package(cmake-fetch REQUIRED PATHS node_modules/cmake-fetch)
find_package(cmake-napi REQUIRED PATHS node_modules/cmake-napi)
find_package(cmake-npm REQUIRED PATHS node_modules/cmake-npm)

project(sqlite3_native C)

if(NOT TARGET sqlite3)
add_subdirectory(vendor/sqlite3 EXCLUDE_FROM_ALL)
endif()
fetch_package("https://sqlite.org/2024/sqlite-amalgamation-3470200.zip" SOURCE_DIR sqlite3)

add_library(sqlite3)

target_sources(
sqlite3
PRIVATE
${sqlite3}/sqlite3.c
)

target_include_directories(
sqlite3
INTERFACE
${sqlite3}
)

add_bare_module(sqlite3_native_bare)

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
"binding.js",
"CMakeLists.txt",
"lib",
"prebuilds",
"vendor/sqlite3"
"prebuilds"
],
"addon": true,
"scripts": {
Expand Down Expand Up @@ -43,6 +42,7 @@
"bare-compat-napi": "^1.0.0",
"brittle": "^3.4.0",
"cmake-bare": "^1.1.15",
"cmake-fetch": "^1.2.0",
"cmake-napi": "^1.0.7",
"cmake-npm": "^1.0.2",
"prettier": "^3.4.2",
Expand Down
17 changes: 0 additions & 17 deletions vendor/sqlite3/CMakeLists.txt

This file was deleted.

Loading

0 comments on commit 6fdb2c7

Please sign in to comment.