node-portmapping
Advanced tools
Comparing version 0.1.1 to 0.1.2
cmake_minimum_required(VERSION 3.13) | ||
project(node_portmapping VERSION 0.1.1) | ||
project(node_portmapping VERSION 0.1.2) | ||
include_directories(${CMAKE_JS_INC}) | ||
set(CMAKE_BUILD_TYPE Debug) | ||
set(CMAKE_BUILD_TYPE Release) | ||
@@ -17,3 +17,3 @@ include(FetchContent) | ||
FetchContent_GetProperties(libplum) | ||
if(NOT libplum) | ||
if(NOT libplum_POPULATED) | ||
FetchContent_Populate(libplum) | ||
@@ -23,3 +23,3 @@ add_subdirectory(${libplum_SOURCE_DIR} ${libplum_BINARY_DIR} EXCLUDE_FROM_ALL) | ||
add_library(node_portmapping SHARED | ||
add_library(${PROJECT_NAME} SHARED | ||
src/wrapper.cpp | ||
@@ -32,17 +32,21 @@ src/mapping.cpp | ||
set_target_properties(node_portmapping PROPERTIES CXX_STANDARD 17) | ||
set_target_properties(node_portmapping PROPERTIES PREFIX "" SUFFIX ".node") | ||
set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 17) | ||
set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "" SUFFIX ".node") | ||
target_include_directories(node_portmapping PRIVATE | ||
${CMAKE_SOURCE_DIR}/node_modules/node-addon-api | ||
${CMAKE_BINARY_DIR}/_deps/libplum-src/include | ||
) | ||
target_link_libraries(node_portmapping PRIVATE | ||
plum-static | ||
target_link_libraries(${PROJECT_NAME} PRIVATE | ||
LibPlum::LibPlumStatic | ||
${CMAKE_JS_LIB} | ||
) | ||
# Include node-addon-api wrappers | ||
execute_process(COMMAND node -p "require('node-addon-api').include" | ||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} | ||
OUTPUT_VARIABLE NODE_ADDON_API_DIR | ||
) | ||
string(REPLACE "\n" "" NODE_ADDON_API_DIR ${NODE_ADDON_API_DIR}) | ||
string(REPLACE "\"" "" NODE_ADDON_API_DIR ${NODE_ADDON_API_DIR}) | ||
target_include_directories(${PROJECT_NAME} PRIVATE ${NODE_ADDON_API_DIR}) | ||
if(UNIX AND NOT APPLE) | ||
target_link_libraries(node_portmapping PRIVATE | ||
target_link_libraries(${PROJECT_NAME} PRIVATE | ||
-static-libgcc | ||
@@ -49,0 +53,0 @@ -static-libstdc++ |
{ | ||
"name": "node-portmapping", | ||
"version": "0.1.1", | ||
"description": "NAT port mapping for Node.js based on libplum", | ||
"version": "0.1.2", | ||
"description": "Multi-protocol NAT Port Mapping for Node.js based on libplum", | ||
"main": "lib/index.js", | ||
@@ -6,0 +6,0 @@ "typings": "lib/index.d.ts", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
47793