diff --git a/cmake/FindMercury.cmake b/cmake/FindMercury.cmake index 7ede231f7f6f3338042a6f48f34a4abb956c41a9..1d536ff695e678ad01b39b0bb6c5779bc2177870 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})