summaryrefslogtreecommitdiffstats
path: root/Modules/FindwxWidgets.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/FindwxWidgets.cmake')
-rw-r--r--Modules/FindwxWidgets.cmake11
1 files changed, 7 insertions, 4 deletions
diff --git a/Modules/FindwxWidgets.cmake b/Modules/FindwxWidgets.cmake
index 05c6625..4533c01 100644
--- a/Modules/FindwxWidgets.cmake
+++ b/Modules/FindwxWidgets.cmake
@@ -57,14 +57,14 @@
# FIND_PACKAGE(wxWidgets COMPONENTS base core gl net)
# IF(wxWidgets_FOUND)
# INCLUDE(${wxWidgets_USE_FILE})
-# # and for each of your dependant executable/library targets:
+# # and for each of your dependent executable/library targets:
# TARGET_LINK_LIBRARIES(<YourTarget> ${wxWidgets_LIBRARIES})
# ENDIF(wxWidgets_FOUND)
#
# If wxWidgets is required (i.e., not an optional part):
# FIND_PACKAGE(wxWidgets REQUIRED base core gl net)
# INCLUDE(${wxWidgets_USE_FILE})
-# # and for each of your dependant executable/library targets:
+# # and for each of your dependent executable/library targets:
# TARGET_LINK_LIBRARIES(<YourTarget> ${wxWidgets_LIBRARIES})
#=============================================================================
@@ -723,10 +723,13 @@ ELSE(wxWidgets_FIND_STYLE STREQUAL "win32")
DBG_MSG_V("wxWidgets_CXX_FLAGS=${wxWidgets_CXX_FLAGS}")
- # parse definitions from cxxflags; drop -D* from CXXFLAGS and the -D prefix
+ # parse definitions from cxxflags;
+ # drop -D* from CXXFLAGS and the -D prefix
STRING(REGEX MATCHALL "-D[^;]+"
wxWidgets_DEFINITIONS "${wxWidgets_CXX_FLAGS}")
- STRING(REGEX REPLACE "-D[^;]+;" ""
+ STRING(REGEX REPLACE "-D[^;]+(;|$)" ""
+ wxWidgets_CXX_FLAGS "${wxWidgets_CXX_FLAGS}")
+ STRING(REGEX REPLACE ";$" ""
wxWidgets_CXX_FLAGS "${wxWidgets_CXX_FLAGS}")
STRING(REPLACE "-D" ""
wxWidgets_DEFINITIONS "${wxWidgets_DEFINITIONS}")