Skip to content

Commit

Permalink
Use cmake-fetch for dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
kasperisager committed Nov 11, 2024
1 parent a5708fe commit 73b6b1e
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 13 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,15 @@ jobs:
runs-on: ${{ matrix.os }}
name: ${{ matrix.platform }}-${{ matrix.arch }}
steps:
- if: ${{ matrix.platform == 'linux' }}
run: |
- run: |
sudo apt update
sudo apt install -y libgtk-4-dev
if: ${{ matrix.platform == 'linux' }}
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-node@v4
with:
node-version: lts/*
- run: npm install -g bare-make
- run: npm install
- run: bare-make generate --platform ${{ matrix.platform }} --arch ${{ matrix.arch }} --debug
- run: bare-make build
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.cache/
build/
node_modules/
package-lock.json
4 changes: 0 additions & 4 deletions .gitmodules

This file was deleted.

6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
cmake_minimum_required(VERSION 3.25)

find_package(cmake-fetch REQUIRED PATHS node_modules/cmake-fetch)

project(fx C)

if(APPLE)
Expand All @@ -10,9 +12,7 @@ if(WIN32)
enable_language(CXX)
endif()

if(NOT TARGET uv)
add_subdirectory(vendor/libuv EXCLUDE_FROM_ALL)
endif()
fetch_package("github:libuv/[email protected]")

add_library(fx OBJECT)

Expand Down
17 changes: 17 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"private": true,
"name": "libfx",
"repository": {
"type": "git",
"url": "git+https://github.com/holepunchto/libfx.git"
},
"author": "Holepunch",
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/holepunchto/libfx/issues"
},
"homepage": "https://github.com/holepunchto/libfx#readme",
"devDependencies": {
"cmake-fetch": "^1.0.0"
}
}
1 change: 0 additions & 1 deletion vendor/libuv
Submodule libuv deleted from be6b81

0 comments on commit 73b6b1e

Please sign in to comment.