From 5381be6c71f2a34fea40a29c12e3f6f8dcf3bad2 Mon Sep 17 00:00:00 2001 From: Dennis Gosnell Date: Thu, 11 May 2023 19:56:32 +0900 Subject: [PATCH] Problem: don't link to openpgm when building with cmake Solution: Add `target_link_libraries()` to `libzmq` for openpgm when openpgm has been enabled. --- CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9940da15..58fc37d5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1515,6 +1515,10 @@ if(BUILD_SHARED) if(norm_FOUND) target_link_libraries(libzmq norm::norm) endif() + + if(OPENPGM_FOUND) + target_link_libraries(libzmq ${OPENPGM_LIBRARIES}) + endif() endif() if(BUILD_STATIC) @@ -1565,6 +1569,10 @@ if(BUILD_STATIC) if(norm_FOUND) target_link_libraries(libzmq-static norm::norm) endif() + + if(OPENPGM_FOUND) + target_link_libraries(libzmq-static ${OPENPGM_LIBRARIES}) + endif() endif() if(BUILD_SHARED)