Skip to content

Commit

Permalink
2 ➡️ 3 (main) (#226)
Browse files Browse the repository at this point in the history
Signed-off-by: Louise Poubel <[email protected]>
  • Loading branch information
chapulina authored Apr 6, 2022
2 parents ee900d2 + 650bf44 commit 4c7c50e
Show file tree
Hide file tree
Showing 52 changed files with 969 additions and 126 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,15 @@ jobs:
uses: ignition-tooling/action-ignition-ci@focal
with:
cmake-args: '-DBUILDSYSTEM_TESTING=True'
jammy-ci:
runs-on: ubuntu-latest
name: Ubuntu Jammy CI
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Compile and test
id: ci
uses: ignition-tooling/action-ignition-ci@jammy
with:
cmake-args: '-DBUILDSYSTEM_TESTING=True'

65 changes: 64 additions & 1 deletion Changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,69 @@
## Ignition CMake 2.x

### Ignition CMake 2.X.X (20XX-XX-XX)
### Ignition CMake 2.x.x (xxxx-xx-xx)

### Ignition CMake 2.11.0 (2022-02-23)

1. Set source path to be used by common::testing
* [Pull request #206](https://github.com/ignitionrobotics/ign-cmake/pull/206)

3. Add examples using static libraries
* [Pull request #202](https://github.com/ignitionrobotics/ign-cmake/pull/202)

### Ignition CMake 2.10.0 (2021-12-21)

1. doxygen allow all .cc, .hh, and CMakeLists.txt, not just in examples/ dir
* [Pull request #198](https://github.com/ignitionrobotics/ign-cmake/pull/198)

1. Add `LEGACY_PROJECT_PREFIX` parameter to `ign_create_core_library`
* [Pull request #199](https://github.com/ignitionrobotics/ign-cmake/pull/199)

1. Add `HIDE_SYMBOLS_BY_DEFAULT` parameter to `ign_configure_build`
* [Pull request #196](https://github.com/ignitionrobotics/ign-cmake/pull/196)

1. Add Ubuntu Jammy CI
* [Pull request #194](https://github.com/ignitionrobotics/ign-cmake/pull/194)

1. FindIgnURDFDOM cmake module
* [Pull request #193](https://github.com/ignitionrobotics/ign-cmake/pull/193)

1. Do not modify `CMAKE_FIND_LIBRARY_PREFIXES` and `CMAKE_FIND_LIBRARY_SUFFIXES` on Windows
* [Pull request #189](https://github.com/ignitionrobotics/ign-cmake/pull/189)

1. Project option: `REPLACE_IGNITION_INCLUDE_PATH`
* [Pull request #190](https://github.com/ignitionrobotics/ign-cmake/pull/190)

1. Project option: `NO_IGNITION_PREFIX`
* [Pull request #191](https://github.com/ignitionrobotics/ign-cmake/pull/191)

### Ignition CMake 2.9.0 (2021-09-02)

1. Fix include directory flags for codecheck
* [Pull request #186](https://github.com/ignitionrobotics/ign-cmake/pull/186)

1. Fix problems on IgnOGRE when version is not found
* [Pull request #175](https://github.com/ignitionrobotics/ign-cmake/pull/175)

1. Remove bitbucket-pipelines.yml
* [Pull request #181](https://github.com/ignitionrobotics/ign-cmake/pull/181)

1. Include IMAGE_PATH directories in ign_create_docs
* [Pull request #183](https://github.com/ignitionrobotics/ign-cmake/pull/183)

1. Special case for ogre2.2 on Windows
* [Pull request #176](https://github.com/ignitionrobotics/ign-cmake/pull/176)
* [Pull request #177](https://github.com/ignitionrobotics/ign-cmake/pull/177)
* [Pull request #178](https://github.com/ignitionrobotics/ign-cmake/pull/178)
* [Pull request #180](https://github.com/ignitionrobotics/ign-cmake/pull/180)

1. Fix building OGRE / OGRE2 from source in colcon workspace
* [Pull request #174](https://github.com/ignitionrobotics/ign-cmake/pull/174)

1. Remove codecov badge from README
* [Pull request #172](https://github.com/ignitionrobotics/ign-cmake/pull/172)

1. Port codecov to new configuration
* [Pull request #170](https://github.com/ignitionrobotics/ign-cmake/pull/170)

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

Expand Down
2 changes: 1 addition & 1 deletion MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ That's right, just throw it all out.
We're migrating to 3.10 because it provides many valuable features that we are
now taking advantage of.

### Then call `find_package(ignition-cmake2 REQUIRED)`
### Then call `find_package(ignition-cmake3 REQUIRED)`

This will find `ignition-cmake` and load up all its useful features for you.

Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ Replace `/path/to/install/dir` to whatever directory you want to install this pa

# Usage

This library is used internally by the ignition projects. See other ignition projects for examples of how this gets used.
Documentation can be accessed at https://ignitionrobotics.org/libs/cmake
[Examples](examples/) are available in this repository.
[Tutorials](tutorials/) are also available in this repository.

# Documentation

Expand Down
69 changes: 50 additions & 19 deletions cmake/FindIgnOGRE.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ if (NOT WIN32)
RESULT_VARIABLE _pkgconfig_failed)
if(_pkgconfig_failed)
IGN_BUILD_WARNING ("Failed to get pkg-config search paths")
elseif (NOT "_pkgconfig_invoke_result" STREQUAL "")
elseif (NOT _pkgconfig_invoke_result STREQUAL "")
set (PKG_CONFIG_PATH_TMP "${PKG_CONFIG_PATH_TMP}:${_pkgconfig_invoke_result}")
endif()

Expand All @@ -83,6 +83,13 @@ if (NOT WIN32)

# loop through pkg config paths and find an ogre version that is < 2.0.0
foreach(pkg_path ${PKG_CONFIG_PATH_TMP})
if (NOT EXISTS ${pkg_path})
continue()
endif()
set(OGRE_FOUND false)
set(OGRE_INCLUDE_DIRS "")
set(OGRE_LIBRARY_DIRS "")
set(OGRE_LIBRARIES "")
set(ENV{PKG_CONFIG_PATH} ${pkg_path})
ign_pkg_check_modules_quiet(OGRE "OGRE >= ${full_version}"
NO_CMAKE_ENVIRONMENT_PATH
Expand All @@ -91,6 +98,31 @@ if (NOT WIN32)
if (NOT ${OGRE_VERSION} VERSION_LESS 2.0.0)
set (OGRE_FOUND false)
else ()
# set library dirs if the value is empty
if (NOT ${OGRE_LIBRARY_DIRS} OR ${OGRE_LIBRARY_DIRS} STREQUAL "")
execute_process(COMMAND pkg-config --variable=libdir OGRE
OUTPUT_VARIABLE _pkgconfig_invoke_result
RESULT_VARIABLE _pkgconfig_failed)
if(_pkgconfig_failed)
IGN_BUILD_WARNING ("Failed to find OGRE's library directory. The build will succeed, but there will likely be run-time errors.")
else()
# set ogre library dir and strip line break
set(OGRE_LIBRARY_DIRS ${_pkgconfig_invoke_result})
string(REGEX REPLACE "\n$" "" OGRE_LIBRARY_DIRS "${OGRE_LIBRARY_DIRS}")

string(FIND "${OGRE_LIBRARIES}" "${OGRE_LIBRARY_DIRS}" substr_found)
# in some cases the value of OGRE_LIBRARIES is "OgreMain;pthread"
# Convert this to full path to library
if (substr_found EQUAL -1)
foreach(OGRE_LIBRARY_NAME ${OGRE_LIBRARIES})
find_library(OGRE_LIBRARY NAMES ${OGRE_LIBRARY_NAME}
HINTS ${OGRE_LIBRARY_DIRS} NO_DEFAULT_PATH)
list (APPEND TMP_OGRE_LIBRARIES "${OGRE_LIBRARY}")
endforeach()
set(OGRE_LIBRARIES ${TMP_OGRE_LIBRARIES})
endif()
endif()
endif()
break()
endif()
endif()
Expand All @@ -107,7 +139,7 @@ if (NOT WIN32)

# find ogre components
foreach(component ${IgnOGRE_FIND_COMPONENTS})
ign_pkg_check_modules_quiet(IgnOGRE-${component} "OGRE-${component} >= ${full_version}")
ign_pkg_check_modules_quiet(IgnOGRE-${component} "OGRE-${component} >= ${full_version}" NO_CMAKE_ENVIRONMENT_PATH)
if(IgnOGRE-${component}_FOUND)
list(APPEND OGRE_LIBRARIES IgnOGRE-${component}::IgnOGRE-${component})
elseif(IgnOGRE_FIND_REQUIRED_${component})
Expand Down Expand Up @@ -206,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
Loading

0 comments on commit 4c7c50e

Please sign in to comment.