Skip to content

Commit

Permalink
2 ➡️ 3
Browse files Browse the repository at this point in the history
Signed-off-by: Louise Poubel <[email protected]>
  • Loading branch information
chapulina committed Feb 26, 2021
2 parents ae85d00 + 96faa49 commit a5254d3
Show file tree
Hide file tree
Showing 72 changed files with 2,355 additions and 390 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# More info:
# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners

* @mxgrey
* @mxgrey @adlarkin @j-rivero
3 changes: 3 additions & 0 deletions .github/ci/packages.apt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
build-essential
cmake
pkg-config
29 changes: 29 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Ubuntu CI

on: [push, pull_request]

jobs:
bionic-ci:
runs-on: ubuntu-latest
name: Ubuntu Bionic CI
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Compile and test
id: ci
uses: ignition-tooling/action-ignition-ci@master
with:
cmake-args: '-DBUILDSYSTEM_TESTING=True'
codecov-token: ${{ secrets.CODECOV_TOKEN }}
focal-ci:
runs-on: ubuntu-latest
name: Ubuntu Focal CI
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Compile and test
id: ci
uses: ignition-tooling/action-ignition-ci@focal
with:
cmake-args: '-DBUILDSYSTEM_TESTING=True'

2 changes: 1 addition & 1 deletion .github/workflows/pr-collection-labeler.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: PR Collection Labeler

on: pull_request
on: pull_request_target

jobs:
pr_collection_labeler:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/triage.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
on:
issues:
types: [opened]
pull_request:
pull_request_target:
types: [opened]
name: Ticket opened
jobs:
Expand Down
31 changes: 29 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ include(IgnCMake)

#--------------------------------------
# Set up the project
ign_configure_project()
ign_configure_project(VERSION_SUFFIX pre1)

#--------------------------------------
# Set project-specific options
Expand Down Expand Up @@ -56,6 +56,7 @@ set(ign_version_output "${PROJECT_NAME_LOWER}-config-version.cmake")
set(ign_config_install_dir "${CMAKE_INSTALL_DATAROOTDIR}/cmake/${PROJECT_NAME_LOWER}")
set(ign_pkgconfig_input "${CMAKE_CURRENT_SOURCE_DIR}/config/ignition-cmake.pc.in")
set(ign_pkgconfig_output "${CMAKE_BINARY_DIR}/ignition-cmake${PROJECT_VERSION_MAJOR}.pc")
set(ign_pkgconfig_install_dir "${IGN_LIB_INSTALL_DIR}/pkgconfig")
set(ign_utilities_target ${PROJECT_EXPORT_NAME}-utilities)
set(ign_utilities_import_target_name ${PROJECT_EXPORT_NAME}::${ign_utilities_target})
set(ign_utilities_target_output_filename "${ign_utilities_target}-targets.cmake")
Expand Down Expand Up @@ -86,11 +87,16 @@ install(

#--------------------------------------
# Configure and install the pkgconfig file (needed for utilities headers)
file(RELATIVE_PATH
IGN_PC_CONFIG_RELATIVE_PATH_TO_PREFIX
"${CMAKE_INSTALL_PREFIX}/${ign_pkgconfig_install_dir}"
"${CMAKE_INSTALL_PREFIX}"
)
configure_file(${ign_pkgconfig_input} ${ign_pkgconfig_output} @ONLY)

install(
FILES ${ign_pkgconfig_output}
DESTINATION ${IGN_LIB_INSTALL_DIR}/pkgconfig
DESTINATION ${ign_pkgconfig_install_dir}
COMPONENT pkgconfig)

#============================================================================
Expand Down Expand Up @@ -182,3 +188,24 @@ if (BUILD_TESTING AND BUILDSYSTEM_TESTING)

add_subdirectory(examples)
endif()

# Codecheck
set(CPPCHECK_DIRS
${CMAKE_SOURCE_DIR}/examples
)
set(CPPCHECK_INCLUDE_DIRS
${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/examples
)
set(IGNITION_CMAKE_CODECHECK_DIR "${CMAKE_CURRENT_SOURCE_DIR}/codecheck")
include(IgnCodeCheck)
ign_setup_target_for_codecheck()

# Docs
set(IGNITION_CMAKE_DOXYGEN_DIR "${CMAKE_CURRENT_SOURCE_DIR}/doc/doxygen")
configure_file(${CMAKE_SOURCE_DIR}/api.md.in ${CMAKE_BINARY_DIR}/api.md)
configure_file(${CMAKE_SOURCE_DIR}/tutorials.md.in ${CMAKE_BINARY_DIR}/tutorials.md)
ign_create_docs(
API_MAINPAGE_MD "${CMAKE_BINARY_DIR}/api.md"
TUTORIALS_MAINPAGE_MD "${CMAKE_BINARY_DIR}/tutorials.md"
)
114 changes: 113 additions & 1 deletion Changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,118 @@
## Ignition CMake 2.x

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

### Ignition CMake 2.7.0 (2021-XX-XX)

1. Set cmake CMP0079 policy
* [Pull request 146](https://github.com/ignitionrobotics/ign-cmake/pull/146)

1. Tutorial about building with cmake and colcon
* [Pull request 145](https://github.com/ignitionrobotics/ign-cmake/pull/145)

1. Add an option to disable docs when building
* [Pull request 144](https://github.com/ignitionrobotics/ign-cmake/pull/144)

1. Install hpp files as headers
* [Pull request 143](https://github.com/ignitionrobotics/ign-cmake/pull/143)

1. Suppress warning C5205 on Windows
* [Pull request 141](https://github.com/ignitionrobotics/ign-cmake/pull/141)

1. Windows installation instructions via conda-forge
* [Pull request 139](https://github.com/ignitionrobotics/ign-cmake/pull/139)

1. Ensure relocatable config files
* [Pull request 129](https://github.com/ignitionrobotics/ign-cmake/pull/129)

### Ignition CMake 2.6.2 (2020-12-29)

1. FindUUID: Always define UUID::UUID on Apple platforms
* [Pull request 128](https://github.com/ignitionrobotics/ign-cmake/pull/128)

1. Remove deprecated doxygen configurations
* [Pull request 136](https://github.com/ignitionrobotics/ign-cmake/pull/136)

1. Generate doxygen tutorials for ign-cmake
* [Pull request 137](https://github.com/ignitionrobotics/ign-cmake/pull/137)

1. Enable make codecheck for ign-cmake
* [Pull request 138](https://github.com/ignitionrobotics/ign-cmake/pull/138)

1. Generate valid visibility macros by replacing hyphens in component name
* [Pull request 135](https://github.com/ignitionrobotics/ign-cmake/pull/135)

### Ignition CMake 2.6.1 (2020-12-10)

1. Revert python to optional dependency
* [Pull request 132](https://github.com/ignitionrobotics/ign-cmake/pull/132)

### Ignition CMake 2.6.0 (2020-12-08)

1. Added build-essential and cmake to packages.apt
* [Pull request 130](https://github.com/ignitionrobotics/ign-cmake/pull/130)

1. Fix FindIgnOgre on Windows when not using vcpkg
* [Pull request 124](https://github.com/ignitionrobotics/ign-cmake/pull/124)

1. FindIgnOGRE2: prefer versioned component libraries
* [Pull request 125](https://github.com/ignitionrobotics/ign-cmake/pull/125)

1. Correct CMake logic and update cpplint to Python3
* [Pull request 117](https://github.com/ignitionrobotics/ign-cmake/pull/117)

1. Improve fork experience
* [Pull request 118](https://github.com/ignitionrobotics/ign-cmake/pull/118)

### Ignition CMake 2.5.0 (2020-09-05)

1. Add additional input directories to parse when generating documentation
* [Pull request 111](https://github.com/ignitionrobotics/ign-cmake/pull/111)

### Ignition CMake 2.4.0 (2020-08-20)

1. Added an option to include generated code in the ign_create_docs function
* [Pull request 108](https://github.com/ignitionrobotics/ign-cmake/pull/108)

### Ignition CMake 2.3.0 (2020-08-07)

1. New macros to help with filter google-test in some platforms
* [Pull request 102](https://github.com/ignitionrobotics/ign-cmake/pull/102)

1. Disable long-running buildsystem tests by default
* [Pull request 97](https://github.com/ignitionrobotics/ign-cmake/pull/97)

1. Fix use of FindYAML.cmake and FindJSONCPP without pkg-config
* [Pull request 79](https://github.com/ignitionrobotics/ign-cmake/pull/79)

1. Fix use of FindIgnOGRE2 on Windows if OGRE2 is not found
* [Pull request 94](https://github.com/ignitionrobotics/ign-cmake/pull/94)
* Thanks to Silvio Traversaro

1. FindUUID: Export include path as expected by Ignition Libraries #104
* [Pull request 104](https://github.com/ignitionrobotics/ign-cmake/pull/104)
* Thanks to Silvio Traversaro

1. Make the OGRE plugin path discovery portable
* [Pull request 101](https://github.com/ignitionrobotics/ign-cmake/pull/101)
* Thanks to Sean Yen

### Ignition CMake 2.2.0

1. Fix use of FindZIP without pkg-config.
* [BitBucket pull request 182](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-cmake/pull-requests/182)

1. Use mathjax to render equations.
* [BitBucket pull request 181](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-cmake/pull-requests/181)

1. Reduce example names to fix build on Windows
* [BitBucket pull request 180](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-cmake/pull-requests/180)

1. Fix doxygen deprecation filter
* [BitBucket pull request 160](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-cmake/pull-requests/160)

1. Change the diamond link icon to a material design link
* [BitBucket pull request 159](https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-cmake/pull-requests/159)

1. Disable long-running buildsystem tests by default.
* [Pull request 97](https://github.com/ignitionrobotics/ign-cmake/pull/97)
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@

Build | Status
-- | --
Test coverage | [![codecov](https://codecov.io/bb/ignitionrobotics/ign-cmake/branch/default/graph/badge.svg)](https://codecov.io/bb/ignitionrobotics/ign-cmake)
Ubuntu Bionic | [![Build Status](https://build.osrfoundation.org/buildStatus/icon?job=ignition_cmake-ci-default-bionic-amd64)](https://build.osrfoundation.org/job/ignition_cmake-ci-default-bionic-amd64)
Homebrew | [![Build Status](https://build.osrfoundation.org/buildStatus/icon?job=ignition_cmake-ci-default-homebrew-amd64)](https://build.osrfoundation.org/job/ignition_cmake-ci-default-homebrew-amd64)
Windows | [![Build Status](https://build.osrfoundation.org/buildStatus/icon?job=ignition_cmake-ci-default-windows7-amd64)](https://build.osrfoundation.org/job/ignition_cmake-ci-default-windows7-amd64)
Test coverage | [![codecov](https://codecov.io/gh/ignitionrobotics/ign-cmake/branch/default/graph/badge.svg)](https://codecov.io/gh/ignitionrobotics/ign-cmake)
Ubuntu Bionic | [![Build Status](https://build.osrfoundation.org/buildStatus/icon?job=ignition_cmake-ci-main-bionic-amd64)](https://build.osrfoundation.org/job/ignition_cmake-ci-main-bionic-amd64)
Homebrew | [![Build Status](https://build.osrfoundation.org/buildStatus/icon?job=ignition_cmake-ci-main-homebrew-amd64)](https://build.osrfoundation.org/job/ignition_cmake-ci-main-homebrew-amd64)
Windows | [![Build Status](https://build.osrfoundation.org/buildStatus/icon?job=ignition_cmake-ci-main-windows7-amd64)](https://build.osrfoundation.org/job/ignition_cmake-ci-main-windows7-amd64)

# Table of Contents

Expand Down
10 changes: 10 additions & 0 deletions api.md.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
## Ignition @IGN_DESIGNATION_CAP@

Ignition @IGN_DESIGNATION_CAP@ is a component in Ignition, a set of libraries
designed to rapidly develop robot and simulation applications.

## License

The code associated with this documentation is licensed under an [Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0).

This documentation is licensed under a [Creative Commons Attribution 4.0 International License](http://creativecommons.org/licenses/by/4.0/).
14 changes: 13 additions & 1 deletion cmake/FindAVCODEC.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,16 @@
########################################
# Find avcodec
include(IgnPkgConfig)
ign_pkg_check_modules(AVCODEC libavcodec)
ign_pkg_check_modules_quiet(AVCODEC libavcodec)

if(NOT AVCODEC_FOUND)
include(IgnManualSearch)
ign_manual_search(AVCODEC
HEADER_NAMES "libavcodec/avcodec.h"
LIBRARY_NAMES "avcodec")
endif()

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
AVCODEC
REQUIRED_VARS AVCODEC_FOUND)
34 changes: 33 additions & 1 deletion cmake/FindAVDEVICE.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,36 @@ set(av_minor ${AVDEVICE_FIND_VERSION_MINOR})
set(av_patch ${AVDEVICE_FIND_VERSION_PATCH})

include(IgnPkgConfig)
ign_pkg_check_modules(AVDEVICE "libavdevice >= ${av_major}.${av_minor}.${av_patch}")
ign_pkg_check_modules_quiet(AVDEVICE "libavdevice >= ${av_major}.${av_minor}.${av_patch}")

if(NOT AVDEVICE_FOUND)
include(IgnManualSearch)
ign_manual_search(AVDEVICE
HEADER_NAMES "libavdevice/avdevice.h"
LIBRARY_NAMES "avdevice")

# Version check
if(AVDEVICE_FOUND)
file(READ "${AVDEVICE_INCLUDE_DIRS}/libavdevice/version.h" ver_file)

string(REGEX MATCH "LIBAVDEVICE_VERSION_MAJOR[ \t\r\n]+([0-9]*)" _ ${ver_file})
set(ver_major ${CMAKE_MATCH_1})

string(REGEX MATCH "LIBAVDEVICE_VERSION_MINOR[ \t\r\n]+([0-9]*)" _ ${ver_file})
set(ver_minor ${CMAKE_MATCH_1})

string(REGEX MATCH "LIBAVDEVICE_VERSION_MICRO[ \t\r\n]+([0-9]*)" _ ${ver_file})
set(ver_patch ${CMAKE_MATCH_1})

set(AVDEVICE_VERSION "${ver_major}.${ver_minor}.${ver_patch}")

if(AVDEVICE_VERSION VERSION_LESS AVDEVICE_FIND_VERSION)
set(AVDEVICE_FOUND FALSE)
endif()
endif()
endif()

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
AVDEVICE
REQUIRED_VARS AVDEVICE_FOUND)
14 changes: 13 additions & 1 deletion cmake/FindAVFORMAT.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,16 @@
########################################
# Find AV format
include(IgnPkgConfig)
ign_pkg_check_modules(AVFORMAT libavformat)
ign_pkg_check_modules_quiet(AVFORMAT libavformat)

if(NOT AVFORMAT_FOUND)
include(IgnManualSearch)
ign_manual_search(AVFORMAT
HEADER_NAMES "libavformat/avformat.h"
LIBRARY_NAMES "avformat")
endif()

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
AVFORMAT
REQUIRED_VARS AVFORMAT_FOUND)
14 changes: 13 additions & 1 deletion cmake/FindAVUTIL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,16 @@
########################################
# Find avutil
include(IgnPkgConfig)
ign_pkg_check_modules(AVUTIL libavutil)
ign_pkg_check_modules_quiet(AVUTIL libavutil)

if(NOT AVUTIL_FOUND)
include(IgnManualSearch)
ign_manual_search(AVUTIL
HEADER_NAMES "libavutil/avutil.h"
LIBRARY_NAMES "avutil")
endif()

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
AVUTIL
REQUIRED_VARS AVUTIL_FOUND)
2 changes: 1 addition & 1 deletion cmake/FindFreeImage.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ if (NOT WIN32)
endif(NOT FreeImage_INCLUDE_DIRS)
mark_as_advanced(FreeImage_INCLUDE_DIRS)

find_library(FreeImage_LIBRARIES freeimage)
find_library(FreeImage_LIBRARIES NAMES freeimage FreeImage)
if(FreeImage_LIBRARIES)
set(FreeImage_FOUND true)
else()
Expand Down
7 changes: 5 additions & 2 deletions cmake/FindIgnOGRE.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ else()
set(prefix "")
# vcpkg uses special directory (lib/manual-link/) to place libraries
# with main sysmbol like OgreMain.
if(ogre_lib MATCHES "OgreMain" AND NOT IS_ABSOLUTE "${ogre_lib}")
if(ogre_lib MATCHES "OgreMain" AND NOT IS_ABSOLUTE "${ogre_lib}" AND EXISTS "${OGRE_LIBRARY_DIRS}/manual-link/")
set(prefix "${OGRE_LIBRARY_DIRS}/manual-link/")
elseif(ogre_lib MATCHES "Ogre" AND NOT IS_ABSOLUTE "${ogre_lib}")
set(prefix "${OGRE_LIBRARY_DIRS}/")
Expand All @@ -191,7 +191,10 @@ else()
# Some Ogre libraries are not using the .lib extension
set(postfix "")
if(NOT ogre_lib MATCHES ".lib$")
set(postfix ".lib")
# Do not consider imported targets as libraries
if(NOT ogre_lib MATCHES "::")
set(postfix ".lib")
endif()
endif()
set(lib_fullpath "${prefix}${ogre_lib}${postfix}")
endif()
Expand Down
Loading

0 comments on commit a5254d3

Please sign in to comment.