Skip to content

Commit

Permalink
Add 'class_loader' package
Browse files Browse the repository at this point in the history
Krasimir Georgiev authored and ruslo committed Jun 24, 2019

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 05e1cb3 commit b1ca847
Showing 6 changed files with 93 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmake/configs/default.cmake
Original file line number Diff line number Diff line change
@@ -194,6 +194,7 @@ hunter_default_version(ceres-solver VERSION 1.14.0-p1)
hunter_default_version(check_ci_tag VERSION 1.0.0)
hunter_default_version(civetweb VERSION 1.11-p0)
hunter_default_version(clBLAS VERSION 2.10.0-p0)
hunter_default_version(class_loader VERSION 0.4.1-p0)
hunter_default_version(cmcstl2 VERSION 0.0.0-bee0705e99)
hunter_default_version(convertutf VERSION 1.0.1)
hunter_default_version(corrade VERSION 2019.01)
32 changes: 32 additions & 0 deletions cmake/projects/class_loader/hunter.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Copyright (c) 2016-2019, Ruslan Baratov
# All rights reserved.

# !!! DO NOT PLACE HEADER GUARDS HERE !!!

include(hunter_add_version)
include(hunter_cacheable)
include(hunter_download)
include(hunter_pick_scheme)
include(hunter_cmake_args)

hunter_add_version(
PACKAGE_NAME
class_loader
VERSION
0.4.1-p0
URL
"https://github.com/hunter-packages/class_loader/archive/v0.4.1-p0.tar.gz"
SHA1
43e3227edd9131a3b4d9e655e60dbba7cd26c3ed
)

hunter_cmake_args(
class_loader
CMAKE_ARGS
BUILD_SHARED_LIBS:BOOL=ON
CATKIN_ENABLE_TESTING:BOOL=OFF
)

hunter_pick_scheme(DEFAULT url_sha1_cmake)
hunter_cacheable(class_loader)
hunter_download(PACKAGE_NAME class_loader)
24 changes: 24 additions & 0 deletions docs/packages/pkg/class_loader.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
.. spelling::

class_loader

.. index:: ROS ; class_loader

.. _pkg.class_loader:

class_loader
============

- `Official <https://official_class_loader>`__
- `Official <https://github.com/ros/class_loader>`__
- `Hunterized <https://github.com/hunter-packages/class_loader>`__
- `Example <https://github.com/ruslo/hunter/blob/master/examples/class_loader/CMakeLists.txt>`__
- Added by `Krasimir Georgiev <https://github.com/kgeorgiev93>`__ (`pr-N <https://github.com/ruslo/hunter/pull/N>`__)
- Contribution partially as part of work at `SeeByte Ltd. <http://www.seebyte.com>`__

`class_loader` must be compiled with `BUILD_SHARED_LIBS=ON` for both libraries that are registered as plugins and libraries that load those plugins at runtime. If linking against `class_loader` statically, plugins would not be loaded correctly at runtime, because both the plugin and the library loading it would use their own copy of `class_loader`.

.. literalinclude:: /../examples/class_loader/CMakeLists.txt
:language: cmake
:start-after: # DOCUMENTATION_START {
:end-before: # DOCUMENTATION_END }
20 changes: 20 additions & 0 deletions examples/class_loader/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright (c) 2016-2019, Ruslan Baratov
# All rights reserved.

cmake_minimum_required(VERSION 3.2)

# Emulate HunterGate:
# * https://github.com/hunter-packages/gate
include("../common.cmake")

project(download-class_loader)

# DOCUMENTATION_START {
hunter_add_package(class_loader)
find_package(catkin CONFIG REQUIRED COMPONENTS class_loader)

catkin_package()

add_executable(main main.cpp)
target_link_libraries(main ${catkin_LIBRARIES})
# DOCUMENTATION_END }
4 changes: 4 additions & 0 deletions examples/class_loader/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#include <class_loader/class_loader.hpp>

int main() {
}
12 changes: 12 additions & 0 deletions examples/class_loader/package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<package format="2">
<name>download-class_loader</name>
<version>0.0.0</version>
<description>
This package provides foo capability.
</description>
<maintainer email="[email protected]">Krasimir Georgiev</maintainer>
<license>BSD</license>

<buildtool_depend>catkin</buildtool_depend>
</package>

0 comments on commit b1ca847

Please sign in to comment.