-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
33 lines (22 loc) · 915 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
26
27
28
29
30
31
32
33
cmake_minimum_required( VERSION 2.8 )
project( node-vtk )
include_directories( ${CMAKE_JS_INC} ../nan )
find_package( Qt5Widgets ) #workaround for 6.1 bug
find_package( VTK REQUIRED )
include( ${VTK_USE_FILE} )
file( GLOB WRAPPERS_ROOT "wrappers" )
file( GLOB VTK_SUPPORTED RELATIVE ${WRAPPERS_ROOT} "wrappers/*" )
if( NOT ";${VTK_SUPPORTED};" MATCHES ";${VTK_VERSION};" )
message( FATAL_ERROR "VTK version \"${VTK_VERSION}\" not supported by node-vtk :(" )
endif()
file( GLOB SOURCE_FILES
"wrappers/${VTK_VERSION}/*.cc"
"wrappers/${VTK_VERSION}/*.h"
"plus/*.h"
"plus/*.cc"
)
include_directories( "wrappers/${VTK_VERSION}" )
add_library( ${PROJECT_NAME} SHARED ${SOURCE_FILES} )
set_target_properties( ${PROJECT_NAME} PROPERTIES PREFIX "" SUFFIX ".node" )
#target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_JS_INC})
target_link_libraries( ${PROJECT_NAME} ${CMAKE_JS_LIB} ${VTK_LIBRARIES} )