Skip to content

Commit

Permalink
[ignition-transport4,9] use system libuuid (#22998)
Browse files Browse the repository at this point in the history
  • Loading branch information
autoantwort authored Feb 9, 2022
1 parent bd8a0df commit 5f6425e
Show file tree
Hide file tree
Showing 9 changed files with 76 additions and 8 deletions.
5 changes: 4 additions & 1 deletion ports/ignition-transport4/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@ ignition_modular_library(NAME transport
VERSION "4.0.0"
SHA512 d4125044c21fdd6754f3b8b06f372df3f858080d5d33e97ed7a8ef8f6fb9857d562082aad41c89ea9146a33b1c3814305d33c5c8f8bcde66a16477b4a01655b4
# This can be removed when the pc file of libuuid on Windows is fixed
DISABLE_PKGCONFIG_INSTALL)
DISABLE_PKGCONFIG_INSTALL
PATCHES
uuid-osx.patch
)
26 changes: 26 additions & 0 deletions ports/ignition-transport4/uuid-osx.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5453cd0..10c2ad4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -58,6 +58,8 @@ ign_find_package(CPPZMQ REQUIRED PRIVATE
# Find uuid
if (MSVC)
message (STATUS "UUID: Using Windows RPC UuidCreate function\n")
+elseif (APPLE)
+ message (STATUS "Use system uuid header")
else()
ign_find_package(UUID REQUIRED)
endif()
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 6683e64..33669ab 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -18,7 +18,7 @@ target_link_libraries(${PROJECT_LIBRARY_TARGET_NAME}
)

# Windows system library provides UUID
-if (NOT MSVC)
+if (NOT MSVC AND NOT APPLE)
target_link_libraries(${PROJECT_LIBRARY_TARGET_NAME}
PUBLIC
UUID::UUID
4 changes: 2 additions & 2 deletions ports/ignition-transport4/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ignition-transport4",
"version-string": "4.0.0",
"port-version": 4,
"version": "4.0.0",
"port-version": 5,
"description": "Transport middleware for robotics",
"dependencies": [
"cppzmq",
Expand Down
5 changes: 4 additions & 1 deletion ports/ignition-transport9/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@ ignition_modular_library(NAME transport
VERSION "9.0.0"
SHA512 c3edb7a8a063b4aa5826838ae08c8ec2b3d14563492022df632a719409c95272f4f6a43d91f0c317e44b85921b5aedc1685670b81a7baa949f01af3b3534d76e
# This can be removed when the pc file of sqlite3 is available ( https://github.com/microsoft/vcpkg/issues/14327 )
DISABLE_PKGCONFIG_INSTALL)
DISABLE_PKGCONFIG_INSTALL
PATCHES
uuid-osx.patch
)
26 changes: 26 additions & 0 deletions ports/ignition-transport9/uuid-osx.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 084b6da..6fd212d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -70,6 +70,8 @@ ign_find_package(CPPZMQ REQUIRED PRIVATE
# Find uuid
if (MSVC)
message (STATUS "UUID: Using Windows RPC UuidCreate function\n")
+elseif (APPLE)
+ message (STATUS "Use system uuid header")
else()
ign_find_package(UUID REQUIRED)
endif()
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 9777240..9e860a9 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -31,7 +31,7 @@ target_link_libraries(${PROJECT_LIBRARY_TARGET_NAME}
)

# Windows system library provides UUID
-if (NOT MSVC)
+if (NOT MSVC AND NOT APPLE)
target_link_libraries(${PROJECT_LIBRARY_TARGET_NAME}
PUBLIC
UUID::UUID
4 changes: 2 additions & 2 deletions ports/ignition-transport9/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ignition-transport9",
"version-string": "9.0.0",
"port-version": 2,
"version": "9.0.0",
"port-version": 3,
"description": "Transport middleware for robotics",
"dependencies": [
"cppzmq",
Expand Down
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -2830,15 +2830,15 @@
},
"ignition-transport4": {
"baseline": "4.0.0",
"port-version": 4
"port-version": 5
},
"ignition-transport8": {
"baseline": "8.1.0",
"port-version": 2
},
"ignition-transport9": {
"baseline": "9.0.0",
"port-version": 2
"port-version": 3
},
"igraph": {
"baseline": "0.9.6",
Expand Down
5 changes: 5 additions & 0 deletions versions/i-/ignition-transport4.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "17d4c446fb99c9510ee2324a03529b6fb1119a41",
"version": "4.0.0",
"port-version": 5
},
{
"git-tree": "24af2dccedbb77ff7f1d514871f291776fd7a86f",
"version-string": "4.0.0",
Expand Down
5 changes: 5 additions & 0 deletions versions/i-/ignition-transport9.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "abbc50866e79bb1566460eb88135358ed740268d",
"version": "9.0.0",
"port-version": 3
},
{
"git-tree": "0829d67a63010fca7f587ca7370db716570aa969",
"version-string": "9.0.0",
Expand Down

0 comments on commit 5f6425e

Please sign in to comment.