summaryrefslogtreecommitdiffstats
path: root/Modules/Use_wxWindows.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2006-07-21 19:43:19 (GMT)
committerBrad King <brad.king@kitware.com>2006-07-21 19:43:19 (GMT)
commit3c9744f406d85a293fc504368d32ba34b5ed3332 (patch)
treeae48986833aa8d1aabb369c88e832e769d9ef5af /Modules/Use_wxWindows.cmake
parentb377c8ac725aea5a7b892b830b29fb80355cb097 (diff)
downloadCMake-3c9744f406d85a293fc504368d32ba34b5ed3332.zip
CMake-3c9744f406d85a293fc504368d32ba34b5ed3332.tar.gz
CMake-3c9744f406d85a293fc504368d32ba34b5ed3332.tar.bz2
ENH: Applying patch from bug#3443 to implement FindwxWidgets.cmake properly. It also updates the UseWX test and WXDialog sources to use the new find script.
Diffstat (limited to 'Modules/Use_wxWindows.cmake')
-rw-r--r--Modules/Use_wxWindows.cmake45
1 files changed, 26 insertions, 19 deletions
diff --git a/Modules/Use_wxWindows.cmake b/Modules/Use_wxWindows.cmake
index 8acd0a1..7d8c438 100644
--- a/Modules/Use_wxWindows.cmake
+++ b/Modules/Use_wxWindows.cmake
@@ -1,43 +1,50 @@
-# - Find wxWindows installation
-#
+#
# This convenience include finds if wxWindows is installed
# and set the appropriate libs, incdirs, flags etc.
-# INCLUDE_DIRECTORIES, LINK_DIRECTORIES and ADD_DEFINITIONS
-# are called.
# author Jan Woetzel <jw -at- mip.informatik.uni-kiel.de> (07/2003)
-#
-# if you are sure you need GL then
-# SET(WXWINDOWS_USE_GL 1)
-# *before* you include this file.
+##
+# -----------------------------------------------------
+# USAGE:
+# just include Use_wxWindows.cmake
+# in your projects CMakeLists.txt
+# INCLUDE( ${CMAKE_MODULE_PATH}/Use_wxWindows.cmake)
+##
+# if you are sure you need GL then
+# SET(WXWINDOWS_USE_GL 1)
+# *before* you include this file.
#
+# -----------------------------------------------------
+# 16.Feb.2004: changed INCLUDE to FIND_PACKAGE to read from users own non-system CMAKE_MODULE_PATH (Jan Woetzel JW)
+# 07/2006: rewrite as FindwxWidgets.cmake, kept for backward compatibilty JW
+
+MESSAGE(STATUS "Use_wxWindows.cmake is DEPRECATED. \n"
+"Please use FIND_PACKAGE(wxWidgets) and INCLUDE(${wxWidgets_USE_FILE}) instead. (JW)")
-INCLUDE(FindwxWindows)
+# ------------------------
+
+FIND_PACKAGE( wxWindows )
IF(WXWINDOWS_FOUND)
-
- #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}")
-
- IF(WXWINDOWS_INCLUDE_DIR)
+
+#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}")
+
+ IF(WXWINDOWS_INCLUDE_DIR)
INCLUDE_DIRECTORIES(${WXWINDOWS_INCLUDE_DIR})
ENDIF(WXWINDOWS_INCLUDE_DIR)
-
- IF(WXWINDOWS_LINK_DIRECTORIES)
+ IF(WXWINDOWS_LINK_DIRECTORIES)
LINK_DIRECTORIES(${WXWINDOWS_LINK_DIRECTORIES})
ENDIF(WXWINDOWS_LINK_DIRECTORIES)
-
IF(WXWINDOWS_LIBRARIES)
LINK_LIBRARIES(${WXWINDOWS_LIBRARIES})
ENDIF(WXWINDOWS_LIBRARIES)
-
IF (CMAKE_WXWINDOWS_CXX_FLAGS)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_WXWINDOWS_CXX_FLAGS}")
ENDIF(CMAKE_WXWINDOWS_CXX_FLAGS)
-
IF(WXWINDOWS_DEFINITIONS)
ADD_DEFINITIONS(${WXWINDOWS_DEFINITIONS})
ENDIF(WXWINDOWS_DEFINITIONS)
-
ELSE(WXWINDOWS_FOUND)
MESSAGE(SEND_ERROR "wxWindows not found by Use_wxWindows.cmake")
ENDIF(WXWINDOWS_FOUND)
+