Skip to content

gyp-to-cmake does not respect requested NAPI_VERSION #96

@mani3xis

Description

@mani3xis

I need to build my C++ add-on for NAPI_VERSION set to 4.
I've added following lines at the end of my binding.gyp file:

    "defines": [
      "NAPI_VERSION=4",
    ]

after running npm run gyp-to-cmake in the generated CMakeLists.txt I get:

add_compile_definitions(-DNAPI_VERSION=8)

I've also tried adding following to my add-on's package.json:

  "binary": {
    "napi_versions": [4]
  }

but I get the same result. I've also tried other options from node-pre-gyp README but they also didn't worked.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions