STYLE: Nightly Version update
[cmake.git] / Modules / FindwxWindows.cmake
blob2a1eea434b6b8611a47a4110e0b95e590474ed7f
1 ##
2 ## This module finds if wxWindows is installed and determines where the
3 ## include files and libraries are. It also determines what the name of
4 ## the library is. This code sets the following variables:
5 ##
6 ## ------------------------------------------------------------------
7 ##
8 ## WXWINDOWS_FOUND            = system has WxWindows (in desired config. build)
9 ##
10 ## WXWINDOWS_LIBRARIES        = full path to the wxWindows libraries
11 ##                              on Unix/Linux with additional linker flags from
12 ##                              "wx-config --libs"
13 ## 
14 ## CMAKE_WXWINDOWS_CXX_FLAGS  = Unix compiler flags for wxWindows, essentially
15 ##                              "`wx-config --cxxflags`"
17 ## WXWINDOWS_INCLUDE_DIR      = where to find headers "wx/wx.h" "wx/setup.h"
19 ## WXWINDOWS_LINK_DIRECTORIES = link directories, useful for rpath on Unix
21 ## WXWINDOWS_DEFINITIONS      = extra defines
23 ## deprecated: 
24 ##   * CMAKE_WX_CAN_COMPILE
25 ##   * WXWINDOWS_LIBRARY
26 ##   * CMAKE_WX_CXX_FLAGS
27 ##   * WXWINDOWS_INCLUDE_PATH
29 ## ------------------------------------------------------------------
31 ## USAGE: 
32 ##   # for convenience include Use_wxWindows.cmake in your projects
33 ##     CMakeLists.txt: 
34 ##   
35 ##   # if you need OpenGL support please
36 ## SET(WXWINDOWS_USE_GL 1) 
37 ##   # in your CMakeLists.txt *before* you include this file.
39 ##   # just include Use_wxWindows.cmake 
40 ##   # in your projects CMakeLists.txt
41 ## INCLUDE(Use_wxWindows)
42 ## 
43 ## ------------------------------------------------------------------
44 ## Author Jan Woetzel <http://www.mip.informatik.uni-kiel.de/~jw> (07/2003)
45 ## ------------------------------------------------------------------
46 ## 
47 ## -changed variable names to conventions from cmakes readme.txt (Jan Woetzel
48 ##  07/07/2003)
49 ## -added definition WINVER for WIN32 (Jan Woetzel 07/07//2003)
50 ## -added IF(CMAKE_WXWINDOWS_CONFIG_EXECUTABLE) found and changed
51 ##  CMAKE_WX_CONFIG to CMAKE_WXWINDOWS_CONFIG_EXECUTABLE (Jan Woetzel
52 ##  07/22/2003)
53 ## -removed OPTION for CMAKE_WXWINDOWS_USE_GL. Force the developer to SET it.
54 ## 
55 ## status: 
56 ## tested with:
57 ##   -cmake 1.6.7, Linux (Suse 7.3), wxWindows 2.4.0, gcc 2.95
58 ##   -cmake 1.6.7, Linux (Suse 8.2), wxWindows 2.4.0, gcc 3.3
59 ##   -cmake 1.6.7, Linux (Suse 8.2), wxWindows 2.4.1-patch1,  gcc 3.3
60 ##   -cmake 1.6.7, MS Windows XP home, wxWindows 2.4.1, MS Visual Studio .net 7
61 ##    2002 (static build)
62 ## 
63 ## TODO: 
64 ##  -OPTION for unicode builds 
65 ##  -change WXWINDOWS_USE_GL to use FindOpenGL.cmake or let the user do it
66 ##  -testing of DLL linking under MS WIN32
67 ## 
69 IF(WIN32)
70   SET(WIN32_STYLE_FIND 1)
71 ENDIF(WIN32)
72 IF(MINGW)
73   SET(WIN32_STYLE_FIND 0)
74   SET(UNIX_STYLE_FIND 1)
75 ENDIF(MINGW)
76 IF(UNIX)
77   SET(UNIX_STYLE_FIND 1)
78 ENDIF(UNIX)
81 IF(WIN32_STYLE_FIND)
82   
83   ## ######################################################################
84   ##
85   ## Windows specific:
86   ##
87   ## candidates for root/base directory of wxwindows
88   ## should have subdirs include and lib containing include/wx/wx.h
89   ## fix the root dir to avoid mixing of headers/libs from different
90   ## versions/builds:
91   
92   SET (WXWINDOWS_POSSIBLE_ROOT_PATHS
93     $ENV{WXWIN}
94     "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\wxWindows_is1;Inno Setup: App Path]" )
95   
96   FIND_PATH(WXWINDOWS_ROOT_DIR  include/wx/wx.h 
97     ${WXWINDOWS_POSSIBLE_ROOT_PATHS} )
98   
99   ## MESSAGE("DBG found WXWINDOWS_ROOT_DIR: ${WXWINDOWS_ROOT_DIR}")
100   
101   ## find libs for combination of static/shared with release/debug
102   SET (WXWINDOWS_POSSIBLE_LIB_PATHS
103     "${WXWINDOWS_ROOT_DIR}/lib" )
104   
105   FIND_LIBRARY(WXWINDOWS_STATIC_LIBRARY
106     NAMES wx wxmsw
107     PATHS ${WXWINDOWS_POSSIBLE_LIB_PATHS}
108     DOC "wxWindows static release build library" )
109   
110   FIND_LIBRARY(WXWINDOWS_STATIC_DEBUG_LIBRARY
111     NAMES wxd wxmswd
112     PATHS ${WXWINDOWS_POSSIBLE_LIB_PATHS} 
113     DOC "wxWindows static debug build library" )
114   
115   FIND_LIBRARY(WXWINDOWS_SHARED_LIBRARY
116     NAMES wxmsw24 wxmsw241 wxmsw240 wx23_2 wx22_9 
117     PATHS ${WXWINDOWS_POSSIBLE_LIB_PATHS} 
118     DOC "wxWindows shared release build library" )
119   
120   FIND_LIBRARY(WXWINDOWS_SHARED_DEBUG_LIBRARY
121     NAMES wxmsw24d wxmsw241d wxmsw240d wx23_2d wx22_9d 
122     PATHS ${WXWINDOWS_POSSIBLE_LIB_PATHS} 
123     DOC "wxWindows shared debug build library " )
124   
125   
126   ## if there is at least one shared lib available
127   ## let user choose wether to use shared or static wxwindows libs 
128   IF(WXWINDOWS_SHARED_LIBRARY OR WXWINDOWS_SHARED_DEBUG_LIBRARY)
129     ## default value OFF because wxWindows MSVS default build is static
130     OPTION(WXWINDOWS_USE_SHARED_LIBS
131       "Use shared versions (dll) of wxWindows libraries?" OFF)
132     MARK_AS_ADVANCED(WXWINDOWS_USE_SHARED_LIBS)
133   ENDIF(WXWINDOWS_SHARED_LIBRARY OR WXWINDOWS_SHARED_DEBUG_LIBRARY)
134   
135   
136   ## add system libraries wxwindows depends on
137   SET(CMAKE_WXWINDOWS_LIBRARIES ${CMAKE_WXWINDOWS_LIBRARIES}
138     comctl32
139     rpcrt4
140     wsock32
141     ##  presumably ctl3d32 is not neccesary (Jan Woetzel 07/2003)
142     #   ctl3d32
143     #    debug ${WXWINDOWS_ROOT_DIR}/lib/zlibd.lib  optimized ${WXWINDOWS_ROOT_DIR}/lib/zlibd.lib
144     #    debug ${WXWINDOWS_ROOT_DIR}/lib/regexd.lib optimized ${WXWINDOWS_ROOT_DIR}/lib/regexd.lib 
145     #    debug ${WXWINDOWS_ROOT_DIR}/lib/pngd.lib   optimized ${WXWINDOWS_ROOT_DIR}/lib/pngd.lib
146     #    debug ${WXWINDOWS_ROOT_DIR}/lib/jpegd.lib  optimized ${WXWINDOWS_ROOT_DIR}/lib/jpegd.lib
147     #    debug ${WXWINDOWS_ROOT_DIR}/lib/tiffd.lib  optimized ${WXWINDOWS_ROOT_DIR}/lib/tiff.lib
148     )
149   
150   # JW removed option and force the develper th SET it. 
151   # OPTION(WXWINDOWS_USE_GL "use wxWindows with GL support (use additional
152   # opengl, glu libs)?" OFF)
153   
154   ## opengl/glu: (TODO/FIXME: better use FindOpenGL.cmake here 
155   IF (WXWINDOWS_USE_GL)
156     SET(CMAKE_WXWINDOWS_LIBRARIES ${CMAKE_WXWINDOWS_LIBRARIES}
157       opengl32
158       glu32
159       )
160   ENDIF (WXWINDOWS_USE_GL)
161   
162   
163   ##
164   ## select between use of  shared or static wxWindows lib then set libs to use
165   ## for debug and optimized build.  so the user can switch between debug and
166   ## release build e.g. within MS Visual Studio without running cmake with a
167   ## different build directory again.
168   ## 
169   ## then add the build specific include dir for wx/setup.h
170   ## 
171   
172   IF(WXWINDOWS_USE_SHARED_LIBS)
173     ##MESSAGE("DBG wxWindows use shared lib selected.")
174     
175     ## shared: both wx (debug and release) found?
176     IF(WXWINDOWS_SHARED_DEBUG_LIBRARY AND WXWINDOWS_SHARED_LIBRARY)
177       ##MESSAGE("DBG wx shared: debug and optimized found.")
178       SET(WXWINDOWS_LIBRARIES ${CMAKE_WXWINDOWS_LIBRARIES}
179         debug     ${WXWINDOWS_SHARED_DEBUG_LIBRARY}
180         optimized ${WXWINDOWS_SHARED_LIBRARY} )
181       FIND_PATH(WXWINDOWS_INCLUDE_DIR_SETUPH  wx/setup.h
182         ${WXWINDOWS_ROOT_DIR}/lib/mswdlld
183         ${WXWINDOWS_ROOT_DIR}/lib/mswdll )
184     ENDIF(WXWINDOWS_SHARED_DEBUG_LIBRARY AND WXWINDOWS_SHARED_LIBRARY)
185     
186     ## shared: only debug wx lib found?
187     IF(WXWINDOWS_SHARED_DEBUG_LIBRARY)
188       IF(NOT WXWINDOWS_SHARED_LIBRARY)
189         ##MESSAGE("DBG wx shared: debug (but no optimized) found.")
190         SET(WXWINDOWS_LIBRARIES ${CMAKE_WXWINDOWS_LIBRARIES}
191           ${WXWINDOWS_SHARED_DEBUG_LIBRARY} )
192         FIND_PATH(WXWINDOWS_INCLUDE_DIR_SETUPH  wx/setup.h
193           ${WXWINDOWS_ROOT_DIR}/lib/mswdlld )
194       ENDIF(NOT WXWINDOWS_SHARED_LIBRARY)
195     ENDIF(WXWINDOWS_SHARED_DEBUG_LIBRARY)
196     
197     ## shared: only release wx lib found?
198     IF(NOT WXWINDOWS_SHARED_DEBUG_LIBRARY)
199       IF(WXWINDOWS_SHARED_LIBRARY)
200         ##MESSAGE("DBG wx shared: optimized (but no debug) found.")
201         SET(WXWINDOWS_LIBRARIES ${CMAKE_WXWINDOWS_LIBRARIES}
202           ${WXWINDOWS_SHARED_DEBUG_LIBRARY} )
203         FIND_PATH(WXWINDOWS_INCLUDE_DIR_SETUPH  wx/setup.h
204           ${WXWINDOWS_ROOT_DIR}/lib/mswdll )
205       ENDIF(WXWINDOWS_SHARED_LIBRARY)    
206     ENDIF(NOT WXWINDOWS_SHARED_DEBUG_LIBRARY)
207     
208     ## shared: none found?
209     IF(NOT WXWINDOWS_SHARED_DEBUG_LIBRARY)
210       IF(NOT WXWINDOWS_SHARED_LIBRARY)
211         MESSAGE(SEND_ERROR 
212           "No shared wxWindows lib found, but WXWINDOWS_USE_SHARED_LIBS=${WXWINDOWS_USE_SHARED_LIBS}.")
213       ENDIF(NOT WXWINDOWS_SHARED_LIBRARY)
214     ENDIF(NOT WXWINDOWS_SHARED_DEBUG_LIBRARY)
217   ELSE(WXWINDOWS_USE_SHARED_LIBS)
218     ##MESSAGE("DBG wxWindows static lib selected.")
220     ## static: both wx (debug and release) found?
221     IF(WXWINDOWS_STATIC_DEBUG_LIBRARY AND WXWINDOWS_STATIC_LIBRARY)
222       ##MESSAGE("DBG wx static: debug and optimized found.")
223       SET(WXWINDOWS_LIBRARIES ${CMAKE_WXWINDOWS_LIBRARIES}
224         debug     ${WXWINDOWS_STATIC_DEBUG_LIBRARY}
225         optimized ${WXWINDOWS_STATIC_LIBRARY} )
226       FIND_PATH(WXWINDOWS_INCLUDE_DIR_SETUPH  wx/setup.h
227         ${WXWINDOWS_ROOT_DIR}/lib/mswd
228         ${WXWINDOWS_ROOT_DIR}/lib/msw )
229     ENDIF(WXWINDOWS_STATIC_DEBUG_LIBRARY AND WXWINDOWS_STATIC_LIBRARY)
230     
231     ## static: only debug wx lib found?
232     IF(WXWINDOWS_STATIC_DEBUG_LIBRARY)
233       IF(NOT WXWINDOWS_STATIC_LIBRARY)
234         ##MESSAGE("DBG wx static: debug (but no optimized) found.")
235         SET(WXWINDOWS_LIBRARIES ${CMAKE_WXWINDOWS_LIBRARIES}
236           ${WXWINDOWS_STATIC_DEBUG_LIBRARY} )
237         FIND_PATH(WXWINDOWS_INCLUDE_DIR_SETUPH  wx/setup.h
238           ${WXWINDOWS_ROOT_DIR}/lib/mswd )
239       ENDIF(NOT WXWINDOWS_STATIC_LIBRARY)
240     ENDIF(WXWINDOWS_STATIC_DEBUG_LIBRARY)
241     
242     ## static: only release wx lib found?
243     IF(NOT WXWINDOWS_STATIC_DEBUG_LIBRARY)
244       IF(WXWINDOWS_STATIC_LIBRARY)
245         ##MESSAGE("DBG wx static: optimized (but no debug) found.")
246         SET(WXWINDOWS_LIBRARIES ${CMAKE_WXWINDOWS_LIBRARIES}
247           ${WXWINDOWS_STATIC_DEBUG_LIBRARY} )
248         FIND_PATH(WXWINDOWS_INCLUDE_DIR_SETUPH  wx/setup.h
249           ${WXWINDOWS_ROOT_DIR}/lib/msw )
250       ENDIF(WXWINDOWS_STATIC_LIBRARY)
251     ENDIF(NOT WXWINDOWS_STATIC_DEBUG_LIBRARY)
252     
253     ## static: none found?
254     IF(NOT WXWINDOWS_STATIC_DEBUG_LIBRARY)
255       IF(NOT WXWINDOWS_STATIC_LIBRARY)
256         MESSAGE(SEND_ERROR 
257           "No static wxWindows lib found, but WXWINDOWS_USE_SHARED_LIBS=${WXWINDOWS_USE_SHARED_LIBS}.")
258       ENDIF(NOT WXWINDOWS_STATIC_LIBRARY)
259     ENDIF(NOT WXWINDOWS_STATIC_DEBUG_LIBRARY)
260     
261   ENDIF(WXWINDOWS_USE_SHARED_LIBS)  
262   
263   
264   ## not neccessary in wxWindows 2.4.1 
265   ## but it may fix a previous bug, see
266   ## http://lists.wxwindows.org/cgi-bin/ezmlm-cgi?8:mss:37574:200305:mpdioeneabobmgjenoap
267   OPTION(WXWINDOWS_SET_DEFINITIONS "Set additional defines for wxWindows" OFF)
268   MARK_AS_ADVANCED(WXWINDOWS_SET_DEFINITIONS)
269   IF (WXWINDOWS_SET_DEFINITIONS) 
270     SET(WXWINDOWS_DEFINITIONS "-DWINVER=0x400")
271   ELSE (WXWINDOWS_SET_DEFINITIONS) 
272     # clear:
273     SET(WXWINDOWS_DEFINITIONS "")
274   ENDIF (WXWINDOWS_SET_DEFINITIONS) 
275   
276   
277   ## Find the include directories for wxwindows
278   ## the first, build specific for wx/setup.h was determined before.
279   ## add inc dir for general for "wx/wx.h" 
280   SET (WXWINDOWS_POSSIBLE_INCLUDE_PATHS
281     "${WXWINDOWS_ROOT_DIR}/include"
282     )
283   FIND_PATH(WXWINDOWS_INCLUDE_DIR  wx/wx.h 
284     ${WXWINDOWS_POSSIBLE_INCLUDE_PATHS}
285     )  
286   # append the build specific include dir for wx/setup.h:
287   IF (WXWINDOWS_INCLUDE_DIR_SETUPH)
288     SET(WXWINDOWS_INCLUDE_DIR ${WXWINDOWS_INCLUDE_DIR} ${WXWINDOWS_INCLUDE_DIR_SETUPH} )
289   ENDIF (WXWINDOWS_INCLUDE_DIR_SETUPH)
290   
291   MARK_AS_ADVANCED(
292     WXWINDOWS_ROOT_DIR
293     WXWINDOWS_INCLUDE_DIR
294     WXWINDOWS_INCLUDE_DIR_SETUPH
295     WXWINDOWS_STATIC_LIBRARY
296     WXWINDOWS_STATIC_DEBUG_LIBRARY
297     WXWINDOWS_SHARED_LIBRARY
298     WXWINDOWS_SHARED_DEBUG_LIBRARY
299     )
300   
301   
302 ELSE(WIN32_STYLE_FIND)
303   IF (UNIX_STYLE_FIND) 
304     ## ######################################################################
305     ## 
306     ## UNIX/Linux specific:
307     ## 
308     ## use backquoted wx-config to query and set flags and libs:
309     ## 06/2003 Jan Woetzel
310     ## 
311     
312     OPTION(WXWINDOWS_USE_SHARED_LIBS "Use shared versions (.so) of wxWindows libraries" ON)
313     MARK_AS_ADVANCED(WXWINDOWS_USE_SHARED_LIBS)
315     # JW removed option and force the develper th SET it. 
316     # OPTION(WXWINDOWS_USE_GL "use wxWindows with GL support (use additional
317     # --gl-libs for wx-config)?" OFF)
318     
319     # wx-config should be in your path anyhow, usually no need to set WXWIN or
320     # search in ../wx or ../../wx
321     FIND_PROGRAM(CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE wx-config
322       $ENV{WXWIN}
323       ../wx/bin
324       ../../wx/bin )
325     
326     # check wether wx-config was found:
327     IF(CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE)    
329       # use shared/static wx lib?
330       # remember: always link shared to use systems GL etc. libs (no static
331       # linking, just link *against* static .a libs)
332       IF(WXWINDOWS_USE_SHARED_LIBS)
333         SET(WX_CONFIG_ARGS_LIBS "--libs")
334       ELSE(WXWINDOWS_USE_SHARED_LIBS)
335         SET(WX_CONFIG_ARGS_LIBS "--static --libs")
336       ENDIF(WXWINDOWS_USE_SHARED_LIBS)
337       
338       # do we need additionial wx GL stuff like GLCanvas ?
339       IF(WXWINDOWS_USE_GL)
340         SET(WX_CONFIG_ARGS_LIBS "${WX_CONFIG_ARGS_LIBS} --gl-libs" )
341       ENDIF(WXWINDOWS_USE_GL)
342       ##MESSAGE("DBG: WX_CONFIG_ARGS_LIBS=${WX_CONFIG_ARGS_LIBS}===")
343       
344       # set CXXFLAGS to be fed into CMAKE_CXX_FLAGS by the user:
345       SET(CMAKE_WXWINDOWS_CXX_FLAGS "`${CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE} --cxxflags`")
346       ##MESSAGE("DBG: for compilation:
347       ##CMAKE_WXWINDOWS_CXX_FLAGS=${CMAKE_WXWINDOWS_CXX_FLAGS}===")
349       # keep the back-quoted string for clarity
350       SET(WXWINDOWS_LIBRARIES "`${CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE} ${WX_CONFIG_ARGS_LIBS}`")
351       ##MESSAGE("DBG2: for linking:
352       ##WXWINDOWS_LIBRARIES=${WXWINDOWS_LIBRARIES}===")
353       
354       # evaluate wx-config output to separate linker flags and linkdirs for
355       # rpath:
356       EXEC_PROGRAM(${CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE}
357         ARGS ${WX_CONFIG_ARGS_LIBS}
358         OUTPUT_VARIABLE WX_CONFIG_LIBS )
359       
360       ## extract linkdirs (-L) for rpath
361       ## use regular expression to match wildcard equivalent "-L*<endchar>"
362       ## with <endchar> is a space or a semicolon
363       STRING(REGEX MATCHALL "[-][L]([^ ;])+" WXWINDOWS_LINK_DIRECTORIES_WITH_PREFIX "${WX_CONFIG_LIBS}" )
364       #MESSAGE("DBG  WXWINDOWS_LINK_DIRECTORIES_WITH_PREFIX=${WXWINDOWS_LINK_DIRECTORIES_WITH_PREFIX}")
365       
366       ## remove prefix -L because we need the pure directory for LINK_DIRECTORIES
367       ## replace -L by ; because the separator seems to be lost otherwise (bug or
368       ## feature?)
369       IF(WXWINDOWS_LINK_DIRECTORIES_WITH_PREFIX)
370         STRING(REGEX REPLACE "[-][L]" ";" WXWINDOWS_LINK_DIRECTORIES ${WXWINDOWS_LINK_DIRECTORIES_WITH_PREFIX} )
371         #MESSAGE("DBG  WXWINDOWS_LINK_DIRECTORIES=${WXWINDOWS_LINK_DIRECTORIES}")
372       ENDIF(WXWINDOWS_LINK_DIRECTORIES_WITH_PREFIX)
374       
375       ## replace space separated string by semicolon separated vector to make it
376       ## work with LINK_DIRECTORIES
377       SEPARATE_ARGUMENTS(WXWINDOWS_LINK_DIRECTORIES)
378       
379       MARK_AS_ADVANCED(
380         CMAKE_WXWINDOWS_CXX_FLAGS
381         WXWINDOWS_INCLUDE_DIR
382         WXWINDOWS_LIBRARIES
383         CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE
384         )
385       
386       
387       # we really need wx-config...
388     ELSE(CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE)    
389       MESSAGE(SEND_ERROR "Cannot find wx-config anywhere on the system. Please put the file into your path or specify it in CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE.")
390       MARK_AS_ADVANCED(CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE)
391     ENDIF(CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE)
393     
394     
395   ELSE(UNIX_STYLE_FIND)
396     MESSAGE(SEND_ERROR "FindwxWindows.cmake:  Platform unknown/unsupported by FindwxWindows.cmake. It's neither WIN32 nor UNIX")
397   ENDIF(UNIX_STYLE_FIND)
398 ENDIF(WIN32_STYLE_FIND)
401 IF(WXWINDOWS_LIBRARIES)
402   IF(WXWINDOWS_INCLUDE_DIR OR CMAKE_WXWINDOWS_CXX_FLAGS)
403     
404     ## found all we need.
405     SET(WXWINDOWS_FOUND 1)
406     
407     ## set deprecated variables for backward compatibility: 
408     SET(CMAKE_WX_CAN_COMPILE   ${WXWINDOWS_FOUND})
409     SET(WXWINDOWS_LIBRARY      ${WXWINDOWS_LIBRARIES})
410     SET(WXWINDOWS_INCLUDE_PATH ${WXWINDOWS_INCLUDE_DIR})
411     SET(CMAKE_WX_CXX_FLAGS     ${CMAKE_WXWINDOWS_CXX_FLAGS})
412     
413   ENDIF(WXWINDOWS_INCLUDE_DIR OR CMAKE_WXWINDOWS_CXX_FLAGS)
414 ENDIF(WXWINDOWS_LIBRARIES)