From 20f8a24d419dd59fb2594e01d0fa422928aa2ee6 Mon Sep 17 00:00:00 2001 From: Stefano Dafarra Date: Tue, 13 Feb 2024 19:12:19 +0100 Subject: [PATCH 1/2] Use GLFW3 all caps to avoid issues on Windows --- cmake/BuildiDynTree.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/BuildiDynTree.cmake b/cmake/BuildiDynTree.cmake index 145fd93e9..9471ee639 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 QUIET) ycm_ep_helper(iDynTree TYPE GIT STYLE GITHUB @@ -34,7 +34,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=${GLFW3_FOUND} -DIDYNTREE_USES_ASSIMP:BOOL=ON -DCMAKE_DISABLE_FIND_PACKAGE_YARP:BOOL=ON -DIDYNTREE_USES_YARP:BOOL=OFF From fb9b603936c05170531e517c07a1fff2e401a89b Mon Sep 17 00:00:00 2001 From: Stefano Dafarra Date: Tue, 13 Feb 2024 19:50:11 +0100 Subject: [PATCH 2/2] Adding some logic to enable irrlicht independently from the casing of GLFW Co-authored-by: Silvio Traversaro --- cmake/BuildiDynTree.cmake | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/cmake/BuildiDynTree.cmake b/cmake/BuildiDynTree.cmake index 9471ee639..14d7802c9 100644 --- a/cmake/BuildiDynTree.cmake +++ b/cmake/BuildiDynTree.cmake @@ -24,7 +24,15 @@ 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 QUIET) + +# See https://github.com/robotology/robotology-superbuild/pull/1598#issuecomment-1942172913 +if(glfw3_FOUND OR GLFW3_FOUND) + set(IDYNTREE_USES_IRRLICHT ON) +else() + set(IDYNTREE_USES_IRRLICHT OFF) +endif() + ycm_ep_helper(iDynTree TYPE GIT STYLE GITHUB @@ -34,7 +42,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