FindwxWindows¶
自 3.0 版本起已棄用:由 FindwxWidgets
取代。
尋找 wxWindows (wxWidgets) 安裝
此模組會尋找是否已安裝 wxWindows/wxWidgets,並判斷 include 檔案和函式庫的位置。它也會判斷函式庫的名稱。此程式碼會設定下列變數
WXWINDOWS_FOUND = system has WxWindows
WXWINDOWS_LIBRARIES = path to the wxWindows libraries
on Unix/Linux with additional
linker flags from
"wx-config --libs"
CMAKE_WXWINDOWS_CXX_FLAGS = Compiler flags for wxWindows,
essentially "`wx-config --cxxflags`"
on Linux
WXWINDOWS_INCLUDE_DIR = where to find "wx/wx.h" and "wx/setup.h"
WXWINDOWS_LINK_DIRECTORIES = link directories, useful for rpath on
Unix
WXWINDOWS_DEFINITIONS = extra defines
選項: 如果您需要 OpenGL 支援,請
set(WXWINDOWS_USE_GL 1)
在您的 CMakeLists.txt 中在包含此檔案之前加入。
HAVE_ISYSTEM - true required to replace -I by -isystem on g++
為了方便起見,請使用 include(${CMAKE_CURRENT_LIST_DIR}/Use_wxWindows.cmake) 將 Use_wxWindows.cmake 包含在您專案的 CMakeLists.txt 中。
用法
set(WXWINDOWS_USE_GL 1)
find_package(wxWindows)
注意:wxWidgets 2.6.x 支援單體建置,例如在 wx/build/msw 目錄中編譯為
nmake -f makefile.vc BUILD=debug SHARED=0 USE_OPENGL=1 MONOLITHIC=1
已棄用
CMAKE_WX_CAN_COMPILE
WXWINDOWS_LIBRARY
CMAKE_WX_CXX_FLAGS
WXWINDOWS_INCLUDE_PATH
作者:Jan Woetzel (2003/07-2006/01)