From 627f1ad80e78062d287c959a237488964986ce4b Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Tue, 13 Feb 2024 20:03:22 +0100 Subject: [PATCH 1/2] Pass NO_MODULE to find_package(glfw3) call to avoid any interference with FindGLFW3 module installed by YCM --- cmake/BuildiDynTree.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/BuildiDynTree.cmake b/cmake/BuildiDynTree.cmake index 145fd93e9..d0127e775 100644 --- a/cmake/BuildiDynTree.cmake +++ b/cmake/BuildiDynTree.cmake @@ -24,7 +24,7 @@ endif() # remove once irrlicht+sdl is available on vcpkg, # and https://github.com/robotology/robotology-superbuild-dependencies-vcpkg # is modified to includ it -find_package(glfw3 QUIET) +find_package(glfw3 NO_MODULE QUIET) ycm_ep_helper(iDynTree TYPE GIT STYLE GITHUB From 5d614b3064a8d5b6e0ae3e464e0d93052b057c22 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Tue, 13 Feb 2024 22:13:52 +0100 Subject: [PATCH 2/2] Change IDYNTREE_USES_IRRLICHT heuristic --- cmake/BuildiDynTree.cmake | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/cmake/BuildiDynTree.cmake b/cmake/BuildiDynTree.cmake index d0127e775..d06edaeb0 100644 --- a/cmake/BuildiDynTree.cmake +++ b/cmake/BuildiDynTree.cmake @@ -23,8 +23,13 @@ endif() # Hack for disabling IDYNTREE_USES_IRRLICHT on vcpkg, # remove once irrlicht+sdl is available on vcpkg, # and https://github.com/robotology/robotology-superbuild-dependencies-vcpkg -# is modified to includ it -find_package(glfw3 NO_MODULE QUIET) +# is modified to include it +if(WIN32 AND NOT ROBOTOLOGY_CONFIGURING_UNDER_CONDA) + # We assume that the case Win32 and not conda is vcpkg, where we do not have irrlicht+sdl + set(IDYNTREE_USES_IRRLICHT OFF) +else() + set(IDYNTREE_USES_IRRLICHT ON) +endif() ycm_ep_helper(iDynTree TYPE GIT STYLE GITHUB @@ -34,7 +39,7 @@ ycm_ep_helper(iDynTree TYPE GIT FOLDER src CMAKE_ARGS -DIDYNTREE_USES_IPOPT:BOOL=ON -DIDYNTREE_USES_OSQPEIGEN:BOOL=ON - -DIDYNTREE_USES_IRRLICHT:BOOL=${glfw3_FOUND} + -DIDYNTREE_USES_IRRLICHT:BOOL=${IDYNTREE_USES_IRRLICHT} -DIDYNTREE_USES_ASSIMP:BOOL=ON -DCMAKE_DISABLE_FIND_PACKAGE_YARP:BOOL=ON -DIDYNTREE_USES_YARP:BOOL=OFF