From 81d02cca38c8e3b5d53334dbeb909aa424a9caff Mon Sep 17 00:00:00 2001 From: Michael Carroll Date: Thu, 12 Aug 2021 18:27:41 -0500 Subject: [PATCH] Special case for ogre2.2 on Windows (#176) * Special case for ogre2.2 on Windows Signed-off-by: Michael Carroll --- cmake/FindIgnOGRE2.cmake | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/cmake/FindIgnOGRE2.cmake b/cmake/FindIgnOGRE2.cmake index d05e678f..cb5bb843 100644 --- a/cmake/FindIgnOGRE2.cmake +++ b/cmake/FindIgnOGRE2.cmake @@ -293,7 +293,19 @@ else() #WIN32 set(OGRE_${ogre_component}_FOUND FALSE) endforeach() # currently designed to work with osrf vcpkg ogre2 portfile + set(OGRE2_PATHS "") + if(${IgnOGRE2_FIND_VERSION_MINOR} EQUAL 2) + message(STATUS "Finding 2") + # Specific case for osrf ogre 2.2 vcpkg + foreach(_rootPath ${VCPKG_CMAKE_FIND_ROOT_PATH}) + list(APPEND OGRE2_PATHS "${_rootPath}/share/ogre22") + endforeach() + else() + set(OGRE2_PATHS ${VCPKG_CMAKE_FIND_ROOT_PATH}) + endif() + find_package(OGRE2 + HINTS ${OGRE2_PATHS} COMPONENTS ${IgnOGRE2_FIND_COMPONENTS}) set(OGRE2_INCLUDE_DIRS ${OGRE_INCLUDE_DIRS}) # Imported from OGRE1: link component libs outside of static build