# Use_wxWindows

Deprecated since version 2.8.10: This module should no longer be used. Use `find_package(wxWidgets)` instead.

This module serves as a convenience wrapper for finding the wxWidgets library (formerly known as wxWindows) and propagates its usage requirements, such as libraries, include directories, and compiler flags, into the current directory scope for use by targets.

Load this module in a CMake project with:

    include(Use_wxWindows)

## Examples

In earlier versions of CMake, wxWidgets (wxWindows) could be found and used in the current directory like this:

`CMakeLists.txt`

    include(Use_wxWindows)

To request OpenGL support, the `WXWINDOWS_USE_GL` variable could be set before including this module:

`CMakeLists.txt`

    set(WXWINDOWS_USE_GL ON)
    include(Use_wxWindows)

    add_library(example example.cxx)

Starting with CMake 3.0, wxWidgets can be found using the `FindwxWidgets` module, which provides the wxWidgets usage requirements either using result variables or imported target as of CMake 3.27:

`CMakeLists.txt`

    find_package(wxWidgets)

    add_library(example example.cxx)

    target_link_libraries(example PRIVATE wxWidgets::wxWidgets)