Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ name: CI

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build-and-test:
Expand Down
26 changes: 26 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,22 @@ find_package(Sofa.Component.Haptics REQUIRED)
find_package(Sofa.GUI.Component REQUIRED)
find_package(Sofa.Component.Engine.Select REQUIRED)

# -------------------------------
# Find OpenCV
# -------------------------------
# Prefer environment variable OPENCV_DIR if set; fallback to default path
if(NOT DEFINED OpenCV_DIR)
set(OpenCV_DIR "$ENV{OPENCV_DIR}" CACHE PATH "Path to OpenCVConfig.cmake")
endif()

if(NOT OpenCV_DIR)
message(FATAL_ERROR "OpenCV_DIR is not set. Please set the environment variable OPENCV_DIR or edit CMakeLists.")
endif()

find_package(OpenCV REQUIRED)
message(STATUS "Found OpenCV version ${OpenCV_VERSION} at ${OpenCV_DIR}")



set(USE_INFINYTOOLKIT_PLUGIN true CACHE BOOL "Use Interaction Tools plugin")

Expand Down Expand Up @@ -77,6 +93,9 @@ set(HEADER_FILES
## Replay motion controller
${INFINYTOOLKIT_SRC_DIR}/MotionReplayController/MotionReplayController.h

## IVUS controller
${INFINYTOOLKIT_SRC_DIR}/IVUSController/IVUSController.h



)
Expand Down Expand Up @@ -116,6 +135,9 @@ set(SOURCE_FILES
## Replay motion controller
${INFINYTOOLKIT_SRC_DIR}/MotionReplayController/MotionReplayController.cpp

## IVUS controller
${INFINYTOOLKIT_SRC_DIR}/IVUSController/IVUSController.cpp


)

Expand Down Expand Up @@ -156,6 +178,10 @@ target_link_libraries(${PROJECT_NAME}
Sofa.Component.Haptics
Sofa.GUI.Component
Sofa.Component.Engine.Select

# <-- Add OpenCV here
${OpenCV_LIBS}

)


Expand Down
Loading