File fix-libwm5core-linkage.patch of Package openms

From c6ae4a42311fc57e1bcb8b00b98b7289b90efb73 Mon Sep 17 00:00:00 2001
From: StefanBruens <stefan.bruens@rwth-aachen.de>
Date: Thu, 18 Aug 2022 05:19:07 +0200
Subject: [PATCH] Correct libOpenMS linkage to libWm5Core

The typo caused libOpenMS not being linked to libWm5Core, but only to
libWm5Mathmatics (twice), causing linker failures later with
`-Wl,--no-undefined`.

Fixes #6301
---
 cmake/Modules/FindWM5.cmake | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmake/Modules/FindWM5.cmake b/cmake/Modules/FindWM5.cmake
index 0b0a2455dd1..191b4ae27b5 100644
--- a/cmake/Modules/FindWM5.cmake
+++ b/cmake/Modules/FindWM5.cmake
@@ -134,7 +134,7 @@ if(WM5_FOUND)
 
   if(NOT TARGET WM5::Core)
     add_library(WM5::Core UNKNOWN IMPORTED) # TODO we could try to infer shared/static
-    set_property(TARGET WM5::Core PROPERTY IMPORTED_LOCATION "${WM5_Wm5Mathematics_LIBRARY_RELEASE}")
+    set_property(TARGET WM5::Core PROPERTY IMPORTED_LOCATION "${WM5_Wm5Core_LIBRARY_RELEASE}")
     set_property(TARGET WM5::Core PROPERTY IMPORTED_LOCATION_RELEASE "${WM5_Wm5Core_LIBRARY_RELEASE}")
     set_property(TARGET WM5::Core PROPERTY IMPORTED_LOCATION_DEBUG "${WM5_Wm5Core_LIBRARY_DEBUG}")
     set_property(TARGET WM5::Core PROPERTY INCLUDE_DIRECTORIES "${WM5_INCLUDE_DIR}")
openSUSE Build Service is sponsored by