From 19ca8079c2ac5e9e954544109c4a2df4dd15c863 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 10 Oct 2017 11:35:39 +0200 Subject: [PATCH] modules: properly save CMAKE_FIND_LIBRARY_PREFIXES in FindMagnum.cmake. On Emscripten this was equal to ";somebogusprefix" (as per the toolchain), which got expanded into just somebogusprefix, losing the empty string. Saving it back to CMAKE_FIND_LIBRARY_PREFIXES would cause all subsequent find_library() calls to fail, because no library is named somebogusprefixMagnum*.bc. Thinking about this, the "somebogusprefix" was probably added "back then" as a workaround to CMake complaining that I'm messing up in the Find module. So I guess I can remove that as well. --- modules/FindMagnum.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/FindMagnum.cmake b/modules/FindMagnum.cmake index ef58d203c..b28d6fd22 100644 --- a/modules/FindMagnum.cmake +++ b/modules/FindMagnum.cmake @@ -455,8 +455,8 @@ foreach(_component ${Magnum_FIND_COMPONENTS}) # Dynamic plugins don't have any prefix (e.g. `lib` on Linux), # search with empty prefix and then reset that back so we don't # accidentaly break something else - set(_tmp_prefixes ${CMAKE_FIND_LIBRARY_PREFIXES}) - set(CMAKE_FIND_LIBRARY_PREFIXES ${CMAKE_FIND_LIBRARY_PREFIXES} "") + set(_tmp_prefixes "${CMAKE_FIND_LIBRARY_PREFIXES}") + set(CMAKE_FIND_LIBRARY_PREFIXES "${CMAKE_FIND_LIBRARY_PREFIXES};") # Try to find both debug and release version. Dynamic and static # debug libraries are in different places.