blob: 3b0300c8aa0ba2d47d1c0b4c103ecb21b826afb5 [file] [log] [blame]
Andrew Geisslerd688a012020-09-18 13:36:00 -05001From 24ad50286a87833329213dc0b0e68c21aeeee95f Mon Sep 17 00:00:00 2001
Andrew Geissler82c905d2020-04-13 13:39:40 -05002From: Niko Mauno <niko.mauno@vaisala.com>
Andrew Geisslerd688a012020-09-18 13:36:00 -05003Date: Wed, 22 Apr 2020 09:00:00 +0300
4Subject: [PATCH] CMakeLists.txt: Avoid host-specific path to libsodium
Andrew Geissler82c905d2020-04-13 13:39:40 -05005
6Avoid propagating full build host specific path to generated
7ZeroMQTargets.cmake when building with libsodium, which changes the
8content in generated ZeroMQTargets.cmake files followingly:
9
10 -INTERFACE_LINK_LIBRARIES "-lpthread;/build/host/specific/path/to/zeromq/4.3.2-r0/recipe-sysroot/usr/lib/libsodium.so;-lrt"
11 +INTERFACE_LINK_LIBRARIES "-lpthread;-lsodium;-lrt"
12
13This change mitigates an issue stemming from reuse of build artifacts
14where the path to libsodium.so does not match exactly between two
15different build hosts.
16
17Upstream-Status: Pending
18
19Signed-off-by: Niko Mauno <niko.mauno@vaisala.com>
20
Andrew Geisslerd688a012020-09-18 13:36:00 -050021---
22 CMakeLists.txt | 4 ++--
23 1 file changed, 2 insertions(+), 2 deletions(-)
24
25diff --git a/CMakeLists.txt b/CMakeLists.txt
26index e92141d..d0775c1 100644
Andrew Geissler82c905d2020-04-13 13:39:40 -050027--- a/CMakeLists.txt
28+++ b/CMakeLists.txt
Andrew Geisslerd688a012020-09-18 13:36:00 -050029@@ -1428,7 +1428,7 @@ if(BUILD_SHARED)
30 endif()
Andrew Geissler82c905d2020-04-13 13:39:40 -050031
32 if(SODIUM_FOUND)
33- target_link_libraries(libzmq ${SODIUM_LIBRARIES})
34+ target_link_libraries(libzmq -lsodium)
35 # On Solaris, libsodium depends on libssp
36 if(${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
37 target_link_libraries(libzmq ssp)
Andrew Geisslerd688a012020-09-18 13:36:00 -050038@@ -1473,7 +1473,7 @@ if(BUILD_STATIC)
39 endif()
Andrew Geissler82c905d2020-04-13 13:39:40 -050040
41 if(SODIUM_FOUND)
42- target_link_libraries(libzmq-static ${SODIUM_LIBRARIES})
43+ target_link_libraries(libzmq-static -lsodium)
44 # On Solaris, libsodium depends on libssp
45 if(${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
46 target_link_libraries(libzmq-static ssp)