forked from jdorner/node-sapnwrfc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
41 lines (35 loc) · 1.07 KB
/
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
cmake_minimum_required(VERSION 2.8.6)
project(sapnwrfc.node)
add_definitions(-DBUILDING_NODE_EXTENSION)
add_definitions(-D_LARGEFILE_SOURCE)
add_definitions(-D_FILE_OFFSET_BITS=64)
add_definitions(-DSAPwithUNICODE)
add_definitions(-DSAPwithTHREADS)
add_definitions(-DSAPonUNIX)
add_definitions(-DSAPonLIN)
add_definitions(-DSAPwithTHREADS)
add_definitions(-D__NO_MATH_INLINES)
link_directories(${NODE_ROOT}/lib)
include_directories(${NODE_ROOT}/include/node)
include_directories(
"${CMAKE_CURRENT_SOURCE_DIR}"
${PROJECT_SOURCE_DIR}/nwrfcsdk/include
)
link_directories(
${PROJECT_SOURCE_DIR}/nwrfcsdk/lib
)
set(Sources
src/binding.cc
src/Common.h
src/Connection.h
src/Connection.cc
src/Function.h
src/Function.cc
examples/example1.js
)
add_library(sapnwrfc.node SHARED ${Sources})
target_link_libraries(sapnwrfc.node sapnwrfc sapucum)
set_target_properties(sapnwrfc.node PROPERTIES OUTPUT_NAME sapnwrfc
PREFIX ""
SUFFIX .node
LINK_FLAGS -rdynamic)