Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix problems on IgnOGRE when version is not found #175

Merged
merged 5 commits into from
Aug 26, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

### Ignition CMake 2.X.X (20XX-XX-XX)

1. Fix problems on IgnOGRE.cmake when version is not found
adlarkin marked this conversation as resolved.
Show resolved Hide resolved

### Ignition CMake 2.8.0 (2021-04-30)

1. Fix hardcoded pkg-config library in examples
Expand Down
29 changes: 15 additions & 14 deletions cmake/FindIgnOGRE.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -236,23 +236,24 @@ else()
set(OGRE_LIBRARIES ${ogre_all_libs})
set(OGRE_RESOURCE_PATH ${OGRE_CONFIG_DIR})
endif()
endif()

# manually search and append the the RenderSystem/GL path to
# OGRE_INCLUDE_DIRS so OGRE GL headers can be found
foreach (dir ${OGRE_INCLUDE_DIRS})
get_filename_component(dir_name "${dir}" NAME)
if("${dir_name}" STREQUAL "OGRE")
if(${OGRE_VERSION} VERSION_LESS 1.11.0)
set(dir_include "${dir}/RenderSystems/GL")
# manually search and append the the RenderSystem/GL path to
# OGRE_INCLUDE_DIRS so OGRE GL headers can be found
foreach(dir ${OGRE_INCLUDE_DIRS})
get_filename_component(dir_name "${dir}" NAME)
if("${dir_name}" STREQUAL "OGRE")
if(${OGRE_VERSION} VERSION_LESS 1.11.0)
set(dir_include "${dir}/RenderSystems/GL")
else()
set(dir_include "${dir}/RenderSystems/GL" "${dir}/Paging")
endif()
else()
set(dir_include "${dir}/RenderSystems/GL" "${dir}/Paging")
set(dir_include "${dir}")
endif()
else()
set(dir_include "${dir}")
endif()
list(APPEND OGRE_INCLUDE_DIRS ${dir_include})
endforeach()
list(APPEND OGRE_INCLUDE_DIRS ${dir_include})
endforeach()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like this block of code is now moved to to the Windows section (instead of if (OGRE_FOUND))? When building ign-rendering with this branch, I get error about not being able to find an ogre include header during compilation. How about just protecting it with a separate if (OGRE_FOUND) check?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ouch, good catch! 0b05939


endif()

set(IgnOGRE_FOUND false)
if(OGRE_FOUND)
Expand Down