iMSTKConfig.cmake.in 1.51 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12
# Include and library paths
set(CMAKE_INCLUDE_PATH "@CMAKE_INCLUDE_PATH@")
set(CMAKE_LIBRARY_PATH "@CMAKE_LIBRARY_PATH@")

# Path to iMSTK source directory
set(iMSTK_SOURCE_DIR "@CMAKE_CURRENT_SOURCE_DIR@")

# Update CMake module path
list(INSERT CMAKE_MODULE_PATH 0 "${iMSTK_SOURCE_DIR}/CMake")

# iMSTK settings
set(iMSTK_USE_OMNI @iMSTK_USE_OMNI@)
13
set(iMSTK_USE_Vulkan @iMSTK_USE_Vulkan@)
14 15 16
set(VegaFEM_DIR @VegaFEM_DIR@)
set(VTK_DIR @VTK_DIR@)

17 18 19
# Assimp
find_package( Assimp REQUIRED )

20 21 22 23
# g3log
find_package( g3log REQUIRED )
include_directories( ${g3log_INCLUDE_DIR} )

24 25 26
# glm
find_package( glm REQUIRED )

27 28 29 30 31 32 33 34
if(iMSTK_USE_Vulkan)
  # glfw
  find_package( glfw REQUIRED )

  # gli
  find_package( gli REQUIRED )
endif()

35 36 37 38
# Eigen
find_package( Eigen 3.1.2 REQUIRED )
include_directories( ${Eigen_INCLUDE_DIR} )

39 40 41 42
# imgui
find_package( imgui REQUIRED )
include_directories( ${imgui_INCLUDE_DIR} )

43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
# SCCD
find_package( SCCD REQUIRED )
include_directories( ${SCCD_INCLUDE_DIR} )

# VegaFEM
find_package( VegaFEM REQUIRED CONFIG )

# VTK
find_package( VTK REQUIRED CONFIG )
include( ${VTK_USE_FILE} )

# VRPN
find_package( VRPN REQUIRED )
include_directories( ${VRPN_INCLUDE_DIRS} )
add_definitions( -DVRPN_USE_LIBNIFALCON )
58
if(iMSTK_USE_OMNI)
59 60 61 62 63 64 65 66 67 68
  add_definitions( -DiMSTK_USE_OPENHAPTICS )
  add_definitions( -DVRPN_USE_PHANTOM_SERVER )
else()
  remove_definitions( -DiMSTK_USE_OPENHAPTICS )
  remove_definitions( -DVRPN_USE_PHANTOM_SERVER )
endif()

# iMSTK
#link_directories(@CMAKE_LIBRARY_PATH@)
include("@CMAKE_CURRENT_BINARY_DIR@/iMSTKTargets.cmake")