Skip to content

Commit

Permalink
LabVIEW support (#8)
Browse files Browse the repository at this point in the history
<!-- Thank you for submitting a pull request to our repository. -->

## Description

This library serves as a wrapper between the native rabbitmq-c library 
and LabVIEW, with its main objective being the adaptation of data types
and
memory allocation for rabbitmq-c functions.

## Changes Made

New CMake target added to labview directory. 

## Related Issues

<!-- Please list any related issues or pull requests.
Fixes #{bug number} - use this specific format or issues won't be
correctly linked to the PR
-->
Fixes #7 

## Checklist

<!-- Please check off the following items by putting an "x" in the box:
-->

- [x] I have used a PR title that is descriptive enough for a release
note.
- [x] I have tested these changes locally.
- [ ] I have added appropriate tests or updated existing tests.
- [ ] I have tested these changes on a dedicated VM or a customer VM
[name of the VM]
- [x] I have added appropriate documentation or updated existing
documentation.

---------

Co-authored-by: chicco785 <[email protected]>
Co-authored-by: kwitekrac <[email protected]>
  • Loading branch information
3 people authored Sep 26, 2023
1 parent 863e3c7 commit e74a6fd
Show file tree
Hide file tree
Showing 32 changed files with 6,631 additions and 161 deletions.
76 changes: 0 additions & 76 deletions .github/workflows/ci.yml

This file was deleted.

32 changes: 0 additions & 32 deletions .github/workflows/cifuzz.yml

This file was deleted.

50 changes: 0 additions & 50 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ option(BUILD_STATIC_LIBS "Build rabbitmq-c as a static library" ON)
option(INSTALL_STATIC_LIBS "Install rabbitmq-c static library" ON)

option(BUILD_EXAMPLES "Build Examples" OFF)
option(BUILD_LABVIEW "Build LabVIEW shared library" ON)
option(BUILD_TOOLS "Build Tools (requires POPT Library)" OFF)
cmake_dependent_option(BUILD_TOOLS_DOCS "Build man pages for tools (requires xmlto)" OFF "BUILD_TOOLS" OFF)
option(BUILD_API_DOCS "Build Doxygen API docs" OFF)
Expand Down Expand Up @@ -162,6 +163,13 @@ if(BUILD_EXAMPLES)
add_subdirectory(examples)
endif()

if(BUILD_LABVIEW)
if(NOT BUILD_SHARED_LIBS)
message(FATAL_ERROR "LabVIEW require -DBUILD_SHARED_LIBS=ON")
endif()
add_subdirectory(labview)
endif()

if(BUILD_TOOLS)
find_package(POPT REQUIRED)
if(BUILD_TOOLS_DOCS)
Expand Down
11 changes: 8 additions & 3 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
# rabbitmq-c Release Notes

## 0.0.1-dev - 2023-06-22
## 0.0.1-dev - 2023-08-07

### Features

- LabVIEW support (PR #8 by @kwitekrac)

### Continuous Integration

- add upstream sync workflow (PR #2 by @chicco785)
- add release note workflow (PR #6 by @chicco785)
- add all issues / pr created in the repo to synchrohub project (PR #5 by @chicco785)
- add all issues / pr created in the repo to synchrohub project (PR #5 by
@chicco785)
- add upstream sync workflow (PR #2 by @chicco785)
32 changes: 32 additions & 0 deletions labview/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Copyright 2007 - 2021, Alan Antonuk and the rabbitmq-c contributors.
# SPDX-License-Identifier: mit

set(RABBITMQ_LV_SOURCES
labview_rabbitmq.c
utils.c utils.h
unix/platform_utils.c
)

set(RMQ_VERSION 3.9.5)
set(RMQ_SOVERSION 3)

add_library(rabbitmq-lv SHARED ${RABBITMQ_LV_SOURCES})
target_link_libraries(rabbitmq-lv PRIVATE rabbitmq::rabbitmq)

if (THREADS_HAVE_PTHREAD_ARG)
target_compile_options(rabbitmq-lv PUBLIC "-pthread")
endif()

if (WIN32)
set_target_properties(rabbitmq-lv PROPERTIES VERSION ${RMQ_VERSION} OUTPUT_NAME rabbitmq.${RMQ_SOVERSION})
else (WIN32)
set_target_properties(rabbitmq-lv PROPERTIES VERSION ${RMQ_VERSION} SOVERSION ${RMQ_SOVERSION})
endif (WIN32)

install(TARGETS rabbitmq-lv
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
)

include_directories(/usr/local/natinst/LabVIEW-2020-64/cintools)
22 changes: 22 additions & 0 deletions labview/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Getting started

This library serves as a wrapper between the native rabbitmq-c library
and LabVIEW, with its main objective being the adaptation of data types and
memory allocation for rabbitmq-c functions.

## How to build library

This library can be built alongside the main rabbitmq-c library using CMake.

```bash
mkdir build ; cd build
cmake ..
cmake --build .
```

The LabVIEW library build can be disabled by changing the default value of the
variable "BUILD_LABVIEW" to "OFF" in the main CMakeLists.txt file.

```bash
option(BUILD_LABVIEW "Build LabVIEW shared library" ON)
```
Loading

0 comments on commit e74a6fd

Please sign in to comment.