2013-10-15 19:17:36 +04:00
|
|
|
#.rst:
|
|
|
|
# Use_wxWindows
|
|
|
|
# -------------
|
|
|
|
#
|
|
|
|
#
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# This convenience include finds if wxWindows is installed and set the
|
|
|
|
# appropriate libs, incdirs, flags etc. author Jan Woetzel <jw -at-
|
|
|
|
# mip.informatik.uni-kiel.de> (07/2003)
|
2008-03-03 23:56:04 +03:00
|
|
|
#
|
|
|
|
# USAGE:
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
|
|
|
# ::
|
|
|
|
#
|
|
|
|
# just include Use_wxWindows.cmake
|
|
|
|
# in your projects CMakeLists.txt
|
|
|
|
#
|
2012-08-13 21:47:32 +04:00
|
|
|
# include( ${CMAKE_MODULE_PATH}/Use_wxWindows.cmake)
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
|
|
|
# ::
|
|
|
|
#
|
|
|
|
# if you are sure you need GL then
|
|
|
|
#
|
2012-08-13 21:47:32 +04:00
|
|
|
# set(WXWINDOWS_USE_GL 1)
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
|
|
|
# ::
|
|
|
|
#
|
|
|
|
# *before* you include this file.
|
2009-09-28 19:46:51 +04:00
|
|
|
|
|
|
|
#=============================================================================
|
|
|
|
# Copyright 2003-2009 Kitware, Inc.
|
|
|
|
# Copyright 2003 Jan Woetzel
|
|
|
|
#
|
|
|
|
# Distributed under the OSI-approved BSD License (the "License");
|
|
|
|
# see accompanying file Copyright.txt for details.
|
2008-03-03 23:56:04 +03:00
|
|
|
#
|
2009-09-28 19:46:51 +04:00
|
|
|
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
|
|
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
# See the License for more information.
|
|
|
|
#=============================================================================
|
2010-08-07 04:48:47 +04:00
|
|
|
# (To distribute this file outside of CMake, substitute the full
|
2009-09-28 19:46:51 +04:00
|
|
|
# License text for the above reference.)
|
|
|
|
|
2006-07-21 23:43:19 +04:00
|
|
|
# -----------------------------------------------------
|
|
|
|
# 16.Feb.2004: changed INCLUDE to FIND_PACKAGE to read from users own non-system CMAKE_MODULE_PATH (Jan Woetzel JW)
|
2009-04-19 20:47:01 +04:00
|
|
|
# 07/2006: rewrite as FindwxWidgets.cmake, kept for backward compatibility JW
|
2006-07-21 23:43:19 +04:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
message(STATUS "Use_wxWindows.cmake is DEPRECATED. \n"
|
|
|
|
"Please use find_package(wxWidgets) and include(${wxWidgets_USE_FILE}) instead. (JW)")
|
2005-12-14 21:51:08 +03:00
|
|
|
|
|
|
|
|
2006-07-21 23:43:19 +04:00
|
|
|
# ------------------------
|
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
find_package( wxWindows )
|
2005-12-14 21:51:08 +03:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
if(WXWINDOWS_FOUND)
|
2006-07-21 23:43:19 +04:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
#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}")
|
2006-07-21 23:43:19 +04:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
if(WXWINDOWS_INCLUDE_DIR)
|
|
|
|
include_directories(${WXWINDOWS_INCLUDE_DIR})
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
2012-08-13 21:47:32 +04:00
|
|
|
if(WXWINDOWS_LINK_DIRECTORIES)
|
|
|
|
link_directories(${WXWINDOWS_LINK_DIRECTORIES})
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
2012-08-13 21:47:32 +04:00
|
|
|
if(WXWINDOWS_LIBRARIES)
|
|
|
|
link_libraries(${WXWINDOWS_LIBRARIES})
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
2012-08-13 21:47:32 +04:00
|
|
|
if (CMAKE_WXWINDOWS_CXX_FLAGS)
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_WXWINDOWS_CXX_FLAGS}")
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
2012-08-13 21:47:32 +04:00
|
|
|
if(WXWINDOWS_DEFINITIONS)
|
|
|
|
add_definitions(${WXWINDOWS_DEFINITIONS})
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
|
|
|
else()
|
2012-08-13 21:47:32 +04:00
|
|
|
message(SEND_ERROR "wxWindows not found by Use_wxWindows.cmake")
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
2006-07-21 23:43:19 +04:00
|
|
|
|