Skip to content

Commit

Permalink
switch to cmake...
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinEady committed Jun 3, 2021
1 parent ece24f0 commit 33a7e1a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
12 changes: 12 additions & 0 deletions typed_threadsafe_function/node-addon-api/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
project (clock)
include_directories(${CMAKE_JS_INC} node_modules/node-addon-api/)
cmake_minimum_required(VERSION 3.18)

# gcc-11.1 fails with c++20 but succeeds with c++17
# Apple clang version 12.0.0 (clang-1200.0.32.29) succeeds with both c++20 and c++17
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
file(GLOB SOURCE_FILES "*.cc")
add_library(${PROJECT_NAME} SHARED ${SOURCE_FILES} ${CMAKE_JS_SRC})
set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "" SUFFIX ".node")
target_link_libraries(${PROJECT_NAME} ${CMAKE_JS_LIB})
14 changes: 0 additions & 14 deletions typed_threadsafe_function/node-addon-api/binding.gyp

This file was deleted.

4 changes: 3 additions & 1 deletion typed_threadsafe_function/node-addon-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@
"private": true,
"dependencies": {
"bindings": "~1.2.1",
"cmake-js": "^6.1.0",
"node-addon-api": "^3.0.0"
},
"scripts": {
"test": "node index.js"
"test": "node index.js",
"install": "cmake-js compile"
},
"gypfile": true
}

0 comments on commit 33a7e1a

Please sign in to comment.