1# Distributed under the OSI-approved BSD 3-Clause License. See accompanying 2# file Copyright.txt or https://cmake.org/licensing for details. 3 4#[=======================================================================[.rst: 5Use_wxWindows 6------------- 7 8.. deprecated:: 2.8.10 9 10 Use ``find_package(wxWidgets)`` and ``include(${wxWidgets_USE_FILE})`` instead. 11 12This convenience include finds if wxWindows is installed and set the 13appropriate libs, incdirs, flags etc. author Jan Woetzel <jw -at- 14mip.informatik.uni-kiel.de> (07/2003) 15 16USAGE: 17 18:: 19 20 just include Use_wxWindows.cmake 21 in your projects CMakeLists.txt 22 23include( ${CMAKE_MODULE_PATH}/Use_wxWindows.cmake) 24 25:: 26 27 if you are sure you need GL then 28 29set(WXWINDOWS_USE_GL 1) 30 31:: 32 33 *before* you include this file. 34#]=======================================================================] 35 36# ----------------------------------------------------- 37# 16.Feb.2004: changed INCLUDE to FIND_PACKAGE to read from users own non-system CMAKE_MODULE_PATH (Jan Woetzel JW) 38# 07/2006: rewrite as FindwxWidgets.cmake, kept for backward compatibility JW 39 40message(STATUS "Use_wxWindows.cmake is DEPRECATED. \n" 41"Please use find_package(wxWidgets) and include(${wxWidgets_USE_FILE}) instead. (JW)") 42 43 44# ------------------------ 45 46find_package( wxWindows ) 47 48if(WXWINDOWS_FOUND) 49 50#message("DBG Use_wxWindows.cmake: WXWINDOWS_INCLUDE_DIR=${WXWINDOWS_INCLUDE_DIR} WXWINDOWS_LINK_DIRECTORIES=${WXWINDOWS_LINK_DIRECTORIES} WXWINDOWS_LIBRARIES=${WXWINDOWS_LIBRARIES} CMAKE_WXWINDOWS_CXX_FLAGS=${CMAKE_WXWINDOWS_CXX_FLAGS} WXWINDOWS_DEFINITIONS=${WXWINDOWS_DEFINITIONS}") 51 52 if(WXWINDOWS_INCLUDE_DIR) 53 include_directories(${WXWINDOWS_INCLUDE_DIR}) 54 endif() 55 if(WXWINDOWS_LINK_DIRECTORIES) 56 link_directories(${WXWINDOWS_LINK_DIRECTORIES}) 57 endif() 58 if(WXWINDOWS_LIBRARIES) 59 link_libraries(${WXWINDOWS_LIBRARIES}) 60 endif() 61 if (CMAKE_WXWINDOWS_CXX_FLAGS) 62 string(APPEND CMAKE_CXX_FLAGS " ${CMAKE_WXWINDOWS_CXX_FLAGS}") 63 endif() 64 if(WXWINDOWS_DEFINITIONS) 65 add_definitions(${WXWINDOWS_DEFINITIONS}) 66 endif() 67else() 68 message(SEND_ERROR "wxWindows not found by Use_wxWindows.cmake") 69endif() 70