--- /usr/share/cmake-2.6/Modules/FindwxWidgets.cmake	2009-04-28 22:22:59.000000000 +0200
+++ /tmp/FindwxWidgets_corrected.cmake	2010-04-23 20:29:52.000000000 +0200
@@ -1,3 +1,7 @@
+# Patched version of cmake 2.6.4-7.el5's FindwxWidgets.cmake script
+# which uuuuuunfortunately doesn't allow for adding custom strings to
+# wx-config.
+
 # - Find a wxWidgets (a.k.a., wxWindows) installation.
 # This module finds if wxWidgets is installed and selects a default
 # configuration to use. wxWidgets is a modular library. To specify the
@@ -681,7 +685,7 @@
       # run the wx-config program to get cxxflags
       EXECUTE_PROCESS(
         COMMAND sh "${wxWidgets_CONFIG_EXECUTABLE}"
-          ${wxWidgets_SELECT_OPTIONS} --cxxflags
+          ${wxWidgets_SELECT_OPTIONS} ${wxWidgets_CUSTOM_OPTIONS} --cxxflags
         OUTPUT_VARIABLE wxWidgets_CXX_FLAGS
         RESULT_VARIABLE RET
         ERROR_QUIET
@@ -724,7 +728,7 @@
         wxWidgets_FIND_COMPONENTS "${wxWidgets_FIND_COMPONENTS}")
       EXECUTE_PROCESS(
         COMMAND sh "${wxWidgets_CONFIG_EXECUTABLE}"
-          ${wxWidgets_SELECT_OPTIONS} --libs ${wxWidgets_FIND_COMPONENTS}
+          ${wxWidgets_SELECT_OPTIONS} ${wxWidgets_CUSTOM_OPTIONS} --libs ${wxWidgets_FIND_COMPONENTS}
         OUTPUT_VARIABLE wxWidgets_LIBRARIES
         RESULT_VARIABLE RET
         ERROR_QUIET
