Skip to content

Commit

Permalink
Fix problems on IgnOGRE when version is not found (#175)
Browse files Browse the repository at this point in the history
* Fix problems on IgnOGRE when version is not found

Signed-off-by: Jose Luis Rivero <[email protected]>
  • Loading branch information
j-rivero authored Aug 26, 2021
1 parent c378cb5 commit ac80fa9
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 18 deletions.
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)

1. Fix problems on IgnOGRE.cmake when version is not found
* [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()

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

0 comments on commit ac80fa9

Please sign in to comment.