Skip to content

Commit

Permalink
ergocub-software: compile ergoCubEmotions by default if OpenCV >= 4.5…
Browse files Browse the repository at this point in the history
….2 (#1539)

* ergocub-software: compile ergoCubEmotions by default

It fixes #1513

* Update cmake/Buildergocub-software.cmake

Co-authored-by: Silvio Traversaro <[email protected]>

* Update cmake/Buildergocub-software.cmake

Co-authored-by: Silvio Traversaro <[email protected]>

* Update cmake/Buildergocub-software.cmake

Co-authored-by: Silvio Traversaro <[email protected]>

* Update Buildergocub-software.cmake

* Update Buildergocub-software.cmake

* Fix typo

---------

Co-authored-by: Silvio Traversaro <[email protected]>
  • Loading branch information
Nicogene and traversaro authored Feb 29, 2024
1 parent d4fab77 commit 0a13a26
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions cmake/Buildergocub-software.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ include(FindOrBuildPackage)

find_or_build_package(YARP QUIET)

set(ergocub-software_OPTIONAL_CMAKE_ARGS "")
find_package(OpenCV QUIET)
if(DEFINED OpenCV_VERSION AND OpenCV_VERSION VERSION_GREATER_EQUAL "4.5.2")
set(COMPILE_ergoCubEmotions ON)
else()
set(COMPILE_ergoCubEmotions OFF)
endif()

ycm_ep_helper(ergocub-software
TYPE GIT
Expand All @@ -16,4 +21,7 @@ ycm_ep_helper(ergocub-software
DEPENDS YARP
COMPONENT core
FOLDER src
CMAKE_ARGS ${ergocub-software_OPTIONAL_CMAKE_ARGS})
DEPENDS YARP
CMAKE_ARGS -DCOMPILE_ergoCubEmotions:BOOL=${COMPILE_ergoCubEmotions})

set(ergocub-sofware_CONDA_DEPENDENCIES libopencv)

0 comments on commit 0a13a26

Please sign in to comment.