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

Add sharedlibpp C++ library #28159

Merged
merged 1 commit into from
Nov 11, 2024
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
21 changes: 21 additions & 0 deletions recipes/sharedlibpp/bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
mkdir build
cd build

cmake %CMAKE_ARGS% ^
-DCMAKE_BUILD_TYPE=Release ^
-G "Ninja" ^
-DBUILD_TESTING:BOOL=ON ^
%SRC_DIR%
if errorlevel 1 exit 1

:: Build.
cmake --build . --config Release
if errorlevel 1 exit 1

:: Test
ctest --output-on-failure -C Release
if errorlevel 1 exit 1

:: Install.
cmake --build . --config Release --target install
if errorlevel 1 exit 1
18 changes: 18 additions & 0 deletions recipes/sharedlibpp/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/sh

rm -rf build
mkdir build
cd build

cmake ${CMAKE_ARGS} -GNinja .. \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_TESTING:BOOL=ON \
..

cmake --build . --config Release

if [[ ("${CONDA_BUILD_CROSS_COMPILATION:-}" != "1" || "${CROSSCOMPILING_EMULATOR}" != "") ]]; then
ctest --output-on-failure -C Release
fi

cmake --build . --config Release --target install
50 changes: 50 additions & 0 deletions recipes/sharedlibpp/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{% set name = "libsharedlibpp" %}
{% set version = "0.0.3" %}

package:
name: {{ name }}
version: {{ version }}

source:
url: https://github.com/ami-iit/sharedlibpp/archive/refs/tags/v{{ version }}.tar.gz
sha256: ae550740d752871dd3ec3930259f7cf273ac2d6b728dbcb05dfc750162dc73dd

build:
number: 0
run_exports:
# See upstream versioning policy in https://github.com/ami-iit/sharedlibpp?tab=readme-ov-file#versioning-policy
- {{ pin_subpackage(name, max_pin='x') }}

requirements:
build:
- {{ compiler('c') }}
- {{ stdlib('c') }}
- {{ compiler('cxx') }}
- cmake
- pkg-config
- ninja
- ycm-cmake-modules

test:
commands:
- test -f ${PREFIX}/include/sharedlibpp/SharedLibraryClassFactory.h # [not win]
- test -f ${PREFIX}/lib/libsharedlibpp${SHLIB_EXT} # [not win]
- if not exist %PREFIX%\\Library\\include\\sharedlibpp\\SharedLibraryClassFactory.h exit 1 # [win]
- if not exist %PREFIX%\\Library\\lib\\sharedlibpp.lib exit 1 # [win]
- if not exist %PREFIX%\\Library\\bin\\sharedlibpp.dll exit 1 # [win]
- cmake-package-check sharedlibpp
requires:
- cmake-package-check
- {{ compiler('c') }}
- {{ compiler('cxx') }}

about:
home: https://github.com/ami-iit/sharedlibpp
license: BSD-3-Clause
license_file: LICENSE
summary: Tiny cross-platform plug-in system (dll, so, dylib).

extra:
feedstock-name: sharedlibpp
recipe-maintainers:
- traversaro