[cmake-developers] [PATCH 1/2] FindwxWidgets.cmake: Fix up wxWidgets_CXXFLAGS

Simon Richter Simon.Richter at hogyros.de
Sun Feb 14 14:51:10 EST 2016


This variable contains a semicolon-separated list, but a string of
space-separated options is needed. As -I and -D options are separated out,
this usually does not cause any trouble, unless more than one option is
needed.
---
 Modules/FindwxWidgets.cmake | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Modules/FindwxWidgets.cmake b/Modules/FindwxWidgets.cmake
index 49ce57e..12cb1ca 100644
--- a/Modules/FindwxWidgets.cmake
+++ b/Modules/FindwxWidgets.cmake
@@ -787,6 +787,10 @@ else()
         string(REPLACE "-I" ""
           wxWidgets_INCLUDE_DIRS "${wxWidgets_INCLUDE_DIRS}")
 
+        # Flags are a string, not a list, fix it here
+        string(REPLACE ";" " "
+          wxWidgets_CXX_FLAGS "${wxWidgets_CXX_FLAGS}")
+
         DBG_MSG_V("wxWidgets_DEFINITIONS=${wxWidgets_DEFINITIONS}")
         DBG_MSG_V("wxWidgets_INCLUDE_DIRS=${wxWidgets_INCLUDE_DIRS}")
         DBG_MSG_V("wxWidgets_CXX_FLAGS=${wxWidgets_CXX_FLAGS}")
-- 
2.1.4



More information about the cmake-developers mailing list