[CMake] Tests on FindwxWidgets.cmake (Win32) with patch

Miguel A. Figueroa-Villanueva miguelf at ieee.org
Sat Dec 13 17:38:35 EST 2008


On Sat, Dec 13, 2008 at 5:47 PM, Werner Smekal wrote:
> Hi Miguel and list,
>
> there are two bugs on Win32 (MinGW/CLI and Visual C++) in
> FindwxWidgets.cmake which should if possible fixed for cmake 2.6.3:
>
> 1) For Unicode builds of wxWidgets (MinGW, Visual C++) linking will fail
> 2) For Debug build of wxWidgets (only MinGW) programs don't run (stop after
> message is shown)
>
> I made extensive tests with both compilers and summarized my findings in
> report.txt (attached). I used the minimal sample and a simple CMakeLists.txt
> (wxW-cmake-test.zip attached).
>
> I made changes to FindwxWidgets.cmake (I took the last cvs version of that
> file) to fix that issues - basically depending on UCD and DBG I'll add
> UNICODE/_UNICODE or _DEBUG/__WXDEBUG__ (maybe _DEBUG doesn't need to be
> defined) to wxwidgets_DEFINITIONS:
>
> After line 565 add:
>        # Add necessary definitions
>        IF("${UCD}" STREQUAL "u")
>          SET(wxWidgets_DEFINITIONS "-DUNICODE -D_UNICODE
> ${wxWidgets_DEFINITIONS}")
>        ENDIF("${UCD}" STREQUAL "u")
>        IF("${DBG}" STREQUAL "d")
>          SET(wxWidgets_DEFINITIONS "-D_DEBUG -D__WXDEBUG__
> ${wxWidgets_DEFINITIONS}")
>        ENDIF("${DBG}" STREQUAL "d")
>
> I made also a patch (attached). I also attached the patched
> FindwxWidgets.cmake.
>
> These two bugs are really now a long time there, I already reported them.
> These changes I made should fix them, I tested the fixes thoroughly, so I
> really hope that the patch will be applied soon. If others have the same
> problems, this will fix it.
>
> Thanks a lot,
> Werner

Thanks Werner. I'll review your documents and apply appropriately this weekend.

--Miguel


More information about the CMake mailing list