[cmake-developers] Fixes to the FindwxWidgets module
sean d'epagnier
seandepagnier at gmail.com
Tue Oct 21 03:51:45 EDT 2014
Hi,
I have recently been working on wxQT which allows wxWidgets to sit on top
of Qt (and thus target otherwise unsupported platforms like android and ios)
I found the FindwxWidgets module had a slight bug, but was not revealed
until I attempted to build applications which use wxQT. I have corrected
it with the attached patch.
I was informed of the recent discussion:
http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/10679
As I use Modules/FindwxWidgets.cmake but not Modules/UsewxWidgets.cmake, I
don't think the recent change will work, further, my change corrects more
problems. I believe the commit "e6fa6e60f6330ddf60294a0d9a6ed4cb3f27d4c4"
is probably not needed after my patch applied.
Thanks,
Sean
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20141021/fdf2c4f6/attachment-0002.html>
-------------- next part --------------
--- FindwxWidgets.cmake 2014-06-25 14:41:27.490159713 +0800
+++ /usr/local/share/cmake-3.0/Modules/FindwxWidgets.cmake 2014-08-22 11:53:11.928480401 +0800
@@ -788,11 +789,16 @@
# parse include dirs from cxxflags; drop -I prefix
string(REGEX MATCHALL "-I[^;]+"
wxWidgets_INCLUDE_DIRS "${wxWidgets_CXX_FLAGS}")
- string(REGEX REPLACE "-I[^;]+;" ""
+ string(REGEX REPLACE "-I[^;]+(;|$)" ""
+ wxWidgets_CXX_FLAGS "${wxWidgets_CXX_FLAGS}")
+ string(REGEX REPLACE ";$" ""
wxWidgets_CXX_FLAGS "${wxWidgets_CXX_FLAGS}")
string(REPLACE "-I" ""
wxWidgets_INCLUDE_DIRS "${wxWidgets_INCLUDE_DIRS}")
+ string(REGEX 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}")
More information about the cmake-developers
mailing list