Skip to content

Commit

Permalink
Special case for ogre2.2 on Windows (gazebosim#176)
Browse files Browse the repository at this point in the history
* Special case for ogre2.2 on Windows

Signed-off-by: Michael Carroll <[email protected]>
  • Loading branch information
mjcarroll authored and srmainwaring committed Mar 1, 2022
1 parent ce2bcb2 commit 81d02cc
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions cmake/FindIgnOGRE2.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 81d02cc

Please sign in to comment.