aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/librabbitmq
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/librabbitmq
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/librabbitmq')
-rw-r--r--vcpkg/ports/librabbitmq/fix-uwpwarning.patch28
-rw-r--r--vcpkg/ports/librabbitmq/portfile.cmake32
-rw-r--r--vcpkg/ports/librabbitmq/vcpkg.json18
3 files changed, 78 insertions, 0 deletions
diff --git a/vcpkg/ports/librabbitmq/fix-uwpwarning.patch b/vcpkg/ports/librabbitmq/fix-uwpwarning.patch
new file mode 100644
index 0000000..84a26d5
--- /dev/null
+++ b/vcpkg/ports/librabbitmq/fix-uwpwarning.patch
@@ -0,0 +1,28 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index c88943f..4fc1411 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -140,6 +140,10 @@ if(PROJECT_IS_TOP_LEVEL)
+ include(CTest)
+ endif()
+
++if(MSVC)
++ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4996")
++endif()
++
+ option(BUILD_SHARED_LIBS "Build rabbitmq-c as a shared library" ON)
+ option(BUILD_STATIC_LIBS "Build rabbitmq-c as a static library" ON)
+ option(INSTALL_STATIC_LIBS "Install rabbitmq-c static library" ON)
+diff --git a/librabbitmq/CMakeLists.txt b/librabbitmq/CMakeLists.txt
+index 4466c9f..e8825dd 100644
+--- a/librabbitmq/CMakeLists.txt
++++ b/librabbitmq/CMakeLists.txt
+@@ -64,6 +64,8 @@ set(RMQ_SOURCES
+ amqp_url.c
+ )
+
++add_definitions(-DAMQP_BUILD -D_CRT_SECURE_NO_WARNINGS)
++
+ set(RMQ_LIBRARIES ${AMQP_SSL_LIBS} ${SOCKET_LIBRARIES} ${LIBRT} ${CMAKE_THREAD_LIBS_INIT})
+
+ if(BUILD_SHARED_LIBS)
diff --git a/vcpkg/ports/librabbitmq/portfile.cmake b/vcpkg/ports/librabbitmq/portfile.cmake
new file mode 100644
index 0000000..0346e55
--- /dev/null
+++ b/vcpkg/ports/librabbitmq/portfile.cmake
@@ -0,0 +1,32 @@
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO alanxz/rabbitmq-c
+ REF "v${VERSION}"
+ SHA512 62b4e92fc270c5bdc5343cfaef5245e29a9b6d8983071a47391a93ae1b766ed7b98a6a546e8528befbc284f5ed17da4647595e94341380bfa76598569191e6c0
+ HEAD_REF master
+ PATCHES
+ fix-uwpwarning.patch
+)
+
+string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC)
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ -DBUILD_EXAMPLES=OFF
+ -DBUILD_TESTING=OFF
+ -DBUILD_TOOLS=OFF
+ -DBUILD_STATIC_LIBS=${BUILD_STATIC}
+)
+
+vcpkg_cmake_install()
+
+vcpkg_cmake_config_fixup(PACKAGE_NAME rabbitmq-c CONFIG_PATH lib/cmake/rabbitmq-c)
+
+vcpkg_fixup_pkgconfig()
+
+vcpkg_copy_pdbs()
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
diff --git a/vcpkg/ports/librabbitmq/vcpkg.json b/vcpkg/ports/librabbitmq/vcpkg.json
new file mode 100644
index 0000000..9325c01
--- /dev/null
+++ b/vcpkg/ports/librabbitmq/vcpkg.json
@@ -0,0 +1,18 @@
+{
+ "name": "librabbitmq",
+ "version": "0.15.0",
+ "description": "A C-language AMQP client library for use with v2.0+ of the RabbitMQ broker.",
+ "homepage": "https://github.com/alanxz/rabbitmq-c",
+ "license": "MIT",
+ "dependencies": [
+ "openssl",
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ]
+}