forked from IntelRealSense/librealsense
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
25 lines (20 loc) · 923 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Copyright (c) 2017 Intel Corporation. All rights reserved.
# Use of this source code is governed by an Apache 2.0 license
# that can be found in the LICENSE file.
cmake_minimum_required(VERSION 3.1.0)
project(RealsenseNodeJSWrappers)
# Compile realsense addon
add_custom_command(
OUTPUT ${PROJECT_SOURCE_DIR}/build/Release/node_librealsense.node
COMMAND env GYP_DEFINES="vs_configuration=$<CONFIGURATION>" npm install
DEPENDS realsense2 index.js binding.gyp package.json src/addon.cpp
WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}"
)
add_custom_target(
BUILD_NODE_ADDON ALL
DEPENDS ${PROJECT_SOURCE_DIR}/build/Release/node_librealsense.node
)
set_target_properties(BUILD_NODE_ADDON PROPERTIES FOLDER Wrappers/NodeJS)
add_custom_target(RealsenseNodeJSWrappers DEPENDS RealsenseNodeJSExamples)
set_target_properties(RealsenseNodeJSWrappers PROPERTIES FOLDER Wrappers/NodeJS)
add_subdirectory(examples)