External_VRPN.cmake 2.34 KB
Newer Older
1
#-----------------------------------------------------------------------------
2
# Dependencies
3
#-----------------------------------------------------------------------------
4
set(VRPN_DEPENDENCIES "LibNiFalcon")
5
if(WIN32)
6
  list(APPEND VRPN_DEPENDENCIES "Libusb")
Aaron Bray's avatar
Aaron Bray committed
7
  list(APPEND VRPN_DEPENDENCIES "FTD2XX")
8
9
endif(WIN32)

10
11
12
#-----------------------------------------------------------------------------
# Phantom Omni
#-----------------------------------------------------------------------------
13
14
option(${PROJECT_NAME}_USE_OpenHaptics "Build OpenHaptics to support the Phantom Omni in VRPN." OFF)
if(${${PROJECT_NAME}_USE_OpenHaptics})
15
  message(STATUS "Superbuild -   VRPN => ENABLING Phantom Omni support")
16
  if(NOT DEFINED OPENHAPTICS_ROOT_DIR OR NOT EXISTS ${OPENHAPTICS_ROOT_DIR})
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
    set(OPENHAPTICS_ROOT_DIR "$ENV{OH_SDK_BASE}" CACHE PATH "Path to OpenHaptics install directory." FORCE)
  endif()
  if(NOT EXISTS ${OPENHAPTICS_ROOT_DIR})
    message(FATAL_ERROR "\nCan not support Phantom Omni without OpenHaptics.\nSet OPENHAPTICS_ROOT_DIR to OpenHaptics installation directory.\n\n")
  endif()
else()
  message(STATUS "Superbuild -   VRPN => Phantom Omni support DISABLED")
  if(DEFINED OPENHAPTICS_ROOT_DIR)
    unset(OPENHAPTICS_ROOT_DIR CACHE)
  endif()
endif()

#-----------------------------------------------------------------------------
# Add External Project
#-----------------------------------------------------------------------------
32
33
include(imstkAddExternalProject)
imstk_add_external_project( VRPN
34
  GIT_REPOSITORY https://gitlab.kitware.com/iMSTK/vrpn.git
Aaron Bray's avatar
Aaron Bray committed
35
  GIT_TAG 021396b8770e6f14cb14427345d0b74479a32d82
36
  # This is the improve-openhaptics-rebase branch
37
  CMAKE_CACHE_ARGS
38
39
40
41
42
    -DBUILD_TESTING:BOOL=OFF
    -DVRPN_SUBPROJECT_BUILD:BOOL=ON
    -DVRPN_BUILD_CLIENTS:BOOL=OFF
    -DVRPN_BUILD_CLIENT_LIBRARY:BOOL=ON
    -DVRPN_BUILD_SERVER_LIBRARY:BOOL=ON
Aaron Bray's avatar
Aaron Bray committed
43
    -DVRPN_INSTALL:BOOL=ON
44
45
    -DVRPN_BUILD_PYTHON:BOOL=OFF
    -DVRPN_USE_GPM_MOUSE:BOOL=OFF
46
    -DVRPN_USE_LIBUSB_1_0:BOOL=ON
47
    -DVRPN_USE_HID:BOOL=ON
48
    -DVRPN_USE_LIBNIFALCON:BOOL=ON
49
50
51
    -DVRPN_BUILD_SERVERS:BOOL=${${PROJECT_NAME}_USE_OpenHaptics}
    -DVRPN_USE_PHANTOM_SERVER:BOOL=${${PROJECT_NAME}_USE_OpenHaptics}
    -DVRPN_USE_HDAPI:BOOL=${${PROJECT_NAME}_USE_OpenHaptics}
52
    -DOPENHAPTICS_ROOT_DIR:PATH=${OPENHAPTICS_ROOT_DIR}
53
  DEPENDENCIES ${VRPN_DEPENDENCIES}
54
  RELATIVE_INCLUDE_PATH ""
55
56
  #VERBOSE
  )