Skip to content

Commit 8db3b5e

Browse files
authored
Merge pull request #5 from externpro/manifestUpdate
manifest update
2 parents 9844a9e + 537576f commit 8db3b5e

5 files changed

Lines changed: 37 additions & 21 deletions

File tree

.devcontainer

Submodule .devcontainer updated 68 files

.github/workflows/xpbuild.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
name: Build
2+
permissions:
3+
contents: read
4+
pull-requests: write
25
on:
36
push:
47
branches: [ "dev" ]
@@ -7,24 +10,21 @@ on:
710
workflow_dispatch:
811
jobs:
912
linux:
10-
uses: externpro/externpro/.github/workflows/build-linux.yml@25.05.1
13+
permissions:
14+
contents: read
15+
pull-requests: write
16+
packages: write
17+
uses: externpro/externpro/.github/workflows/build-linux.yml@25.07.3
1118
with:
1219
cmake-workflow-preset: LinuxRelease
13-
runon: ubuntu-latest
14-
secrets: inherit
15-
linux-arm64:
16-
uses: externpro/externpro/.github/workflows/build-linux.yml@25.05.1
17-
with:
18-
cmake-workflow-preset: LinuxRelease
19-
runon: ubuntu-24.04-arm
2020
secrets: inherit
2121
macos:
22-
uses: externpro/externpro/.github/workflows/build-macos.yml@25.05.1
22+
uses: externpro/externpro/.github/workflows/build-macos.yml@25.07.3
2323
with:
2424
cmake-workflow-preset: DarwinRelease
2525
secrets: inherit
2626
windows:
27-
uses: externpro/externpro/.github/workflows/build-windows.yml@25.05.1
27+
uses: externpro/externpro/.github/workflows/build-windows.yml@25.07.3
2828
with:
2929
cmake-workflow-preset: WindowsRelease
3030
secrets: inherit

.github/workflows/xprelease.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@ on:
99
jobs:
1010
# Upload build artifacts as release assets
1111
release-from-build:
12-
uses: externpro/externpro/.github/workflows/release-from-build.yml@25.05.1
12+
uses: externpro/externpro/.github/workflows/release-from-build.yml@25.07.3
1313
with:
1414
workflow_run_url: ${{ github.event.inputs.workflow_run_url }}
15-
artifact_pattern: "*.tar.xz"
1615
permissions:
1716
contents: write
1817
id-token: write

CMakeLists.txt

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,22 @@
11
cmake_minimum_required(VERSION 3.31)
22
set(CMAKE_PROJECT_TOP_LEVEL_INCLUDES .devcontainer/cmake/xproinc.cmake)
33
project(node-addon-api VERSION 8.5.0)
4-
include(xpflags)
5-
include(GNUInstallDirs)
6-
set(XP_INSTALL_CMAKEDIR ${CMAKE_INSTALL_DATADIR}/cmake) # xpPackageDevel
7-
set(XP_NAMESPACE xpro)
84
set(targetsFile ${PROJECT_NAME}-targets)
95
set(lib_name ${PROJECT_NAME})
106
xpFindPkg(PKGS nodexp)
11-
xpPackageDevel(TARGETS_FILE ${targetsFile} DEPS nodexp LIBRARIES ${XP_NAMESPACE}::${lib_name})
7+
if(DEFINED XP_NAMESPACE)
8+
xpExternPackage(NAMESPACE ${XP_NAMESPACE}
9+
TARGETS_FILE ${targetsFile} LIBRARIES ${lib_name}
10+
BASE v${CMAKE_PROJECT_VERSION} XPDIFF "intro" DEPS nodexp
11+
WEB "https://github.com/nodejs/node-addon-api" UPSTREAM "github.com/nodejs/node-addon-api"
12+
DESC "Module for using N-API from C++"
13+
LICENSE "[MIT](https://github.com/nodejs/node-addon-api/blob/v8.5.0/LICENSE.md 'MIT License')"
14+
)
15+
set(CMAKE_INSTALL_CMAKEDIR ${XP_INSTALL_CMAKEDIR})
16+
set(nameSpace NAMESPACE ${XP_NAMESPACE}::)
17+
elseif(NOT DEFINED CMAKE_INSTALL_CMAKEDIR)
18+
set(CMAKE_INSTALL_CMAKEDIR ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME})
19+
endif()
1220
########################################
1321
set(libsrcs
1422
napi-inl.deprecated.h
@@ -19,10 +27,10 @@ set(libsrcs
1927
add_library(${lib_name} INTERFACE ${libsrcs})
2028
target_include_directories(${lib_name} INTERFACE $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
2129
target_compile_definitions(${lib_name} INTERFACE NODE_ADDON_API_DISABLE_DEPRECATED NAPI_CPP_EXCEPTIONS)
22-
target_link_libraries(${lib_name} INTERFACE ${XP_NAMESPACE}::node)
30+
target_link_libraries(${lib_name} INTERFACE ${NODEXP_LIBRARIES})
2331
########################################
2432
install(TARGETS ${lib_name} EXPORT ${targetsFile})
2533
install(FILES ${libsrcs} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME})
26-
install(EXPORT ${targetsFile} DESTINATION ${XP_INSTALL_CMAKEDIR} NAMESPACE ${XP_NAMESPACE}::)
34+
install(EXPORT ${targetsFile} DESTINATION ${CMAKE_INSTALL_CMAKEDIR} ${nameSpace})
2735
install(FILES CHANGELOG.md LICENSE.md README.md DESTINATION ${CMAKE_INSTALL_DATADIR})
2836
install(DIRECTORY doc DESTINATION ${CMAKE_INSTALL_DATADIR})

CMakePresetsBase.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,16 @@
44
{
55
"name": "config-base",
66
"hidden": true,
7-
"binaryDir": "${sourceDir}/_bld-${presetName}"
7+
"binaryDir": "${sourceDir}/_bld-${presetName}",
8+
"cacheVariables": {
9+
"XP_NAMESPACE": "xpro"
10+
}
11+
}
12+
],
13+
"buildPresets": [
14+
{
15+
"name": "build-base",
16+
"hidden": true
817
}
918
]
1019
}

0 commit comments

Comments
 (0)