From 67db3ff958302d09dca208ff54c699beb4a9d13d Mon Sep 17 00:00:00 2001 From: Raffi Enficiaud Date: Sat, 17 Feb 2018 16:15:57 +0100 Subject: Fix eating "-L" in path names When the path containing the wxLibraries contains a "-L", a "string(REPLACE "-L" ...) replaces the content and results in a wrong path. The regex fixes this. --- Modules/FindwxWidgets.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/FindwxWidgets.cmake b/Modules/FindwxWidgets.cmake index e21ec38..965948e 100644 --- a/Modules/FindwxWidgets.cmake +++ b/Modules/FindwxWidgets.cmake @@ -837,7 +837,7 @@ else() # extract linkdirs (-L) for rpath (i.e., LINK_DIRECTORIES) string(REGEX MATCHALL "-L[^;]+" wxWidgets_LIBRARY_DIRS "${wxWidgets_LIBRARIES}") - string(REPLACE "-L" "" + string(REGEX REPLACE "-L([^;]+)" "\\1" wxWidgets_LIBRARY_DIRS "${wxWidgets_LIBRARY_DIRS}") DBG_MSG_V("wxWidgets_LIBRARIES=${wxWidgets_LIBRARIES}") -- cgit v0.12