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 all 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
5 changes: 4 additions & 1 deletion Changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
## Ignition CMake 2.x

### Ignition CMake 2.X.X (20XX-XX-XX)
### Ignition CMake 2.X.X (2021-08-23)
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we planning to make an ign-cmake release once this PR is merged?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We might need to since seems to be causing problems on current CI. See gazebosim/gz-rendering#376 (comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

leaving here by now. Going to merge to solve problems on CI.


1. Fix problems on IgnOGRE.cmake when version is not found
adlarkin marked this conversation as resolved.
Show resolved Hide resolved
* [Pull request #175](https://github.com/ignitionrobotics/ign-cmake/pull/175)

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

Expand Down
33 changes: 16 additions & 17 deletions cmake/FindIgnOGRE.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -238,28 +238,27 @@ else()
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")
else()
set(dir_include "${dir}/RenderSystems/GL" "${dir}/Paging")
endif()
else()
set(dir_include "${dir}")
endif()
list(APPEND OGRE_INCLUDE_DIRS ${dir_include})
endforeach()

set(IgnOGRE_FOUND false)
if(OGRE_FOUND)
set(IgnOGRE_FOUND true)

include(IgnImportTarget)
# 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}")
endif()
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


include(IgnImportTarget)
ign_import_target(IgnOGRE
TARGET_NAME IgnOGRE::IgnOGRE
LIB_VAR OGRE_LIBRARIES
Expand Down