From 920f0e36be5982de4ae5d2f42e0cbc1a93d94cf9 Mon Sep 17 00:00:00 2001 From: Alberto Miranda Date: Thu, 29 Sep 2022 15:39:47 +0200 Subject: [PATCH] Don't try to build against missing Mercury components --- cmake/FindMercury.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmake/FindMercury.cmake b/cmake/FindMercury.cmake index 7ede231f..1d536ff6 100644 --- a/cmake/FindMercury.cmake +++ b/cmake/FindMercury.cmake @@ -115,6 +115,11 @@ macro(_mercury_find_component _component_name) PATHS ${PC_MERCURY_LIBRARY_DIRS} ) + if(NOT ${_upper_component}_LIBRARY_RELEASE AND + NOT ${_upper_component}_LIBRARY_DEBUG) + return() + endif () + # initialize ${_upper_component}_LIBRARY (e.g. NA_LIBRARY) # with the appropriate library for this build configuration select_library_configurations(${_upper_component}) -- GitLab