Răsfoiți Sursa

UsewxWidgets: CFLAGS are expected to be a string here, not a list.

Richard M. Shaw 11 ani în urmă
părinte
comite
e6fa6e60f6
1 a modificat fișierele cu 5 adăugiri și 2 ștergeri
  1. 5 2
      Modules/UsewxWidgets.cmake

+ 5 - 2
Modules/UsewxWidgets.cmake

@@ -88,8 +88,11 @@ if   (wxWidgets_FOUND)
   endif()
   endif()
 
 
   if   (wxWidgets_CXX_FLAGS)
   if   (wxWidgets_CXX_FLAGS)
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${wxWidgets_CXX_FLAGS}")
-    MSG("wxWidgets_CXX_FLAGS=${wxWidgets_CXX_FLAGS}")
+    # Flags are expected to be a string here, not a list.
+    string(REPLACE ";" " " wxWidgets_CXX_FLAGS_str "${wxWidgets_CXX_FLAGS}")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${wxWidgets_CXX_FLAGS_str}")
+    MSG("wxWidgets_CXX_FLAGS=${wxWidgets_CXX_FLAGS_str}")
+    unset(wxWidgets_CXX_FLAGS_str)
   endif()
   endif()
 
 
   # DEPRECATED JW
   # DEPRECATED JW