STYLE: Nightly Version update
[cmake.git] / Modules / Use_wxWindows.cmake
blobba69dea2176ff5e39927be304965eb36cd980f43
1 ## \r
2 ## This convenience include finds if wxWindows is installed\r
3 ## and set the appropriate libs, incdirs, flags etc. \r
4 \r
5 ## author Jan Woetzel <jw -at- mip.informatik.uni-kiel.de> (07/2003)\r
6 ##\r
7 ## -----------------------------------------------------\r
8 ## USAGE: \r
9 ##   just include Use_wxWindows.cmake \r
10 ##   in your projects CMakeLists.txt\r
11 ## INCLUDE(Use_wxWindows)\r
12 ##\r
13 ##   if you are sure you need GL then\r
14 ## SET(WXWINDOWS_USE_GL 1)\r
15 ##   *before* you include this file.\r
16 ## \r
17 ## -----------------------------------------------------\r
21 INCLUDE(FindwxWindows)\r
23 IF(WXWINDOWS_FOUND)\r
24   \r
25   #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}")\r
26   \r
27   IF(WXWINDOWS_INCLUDE_DIR)\r
28     INCLUDE_DIRECTORIES(${WXWINDOWS_INCLUDE_DIR})\r
29   ENDIF(WXWINDOWS_INCLUDE_DIR)\r
30  \r
31   IF(WXWINDOWS_LINK_DIRECTORIES)\r
32     LINK_DIRECTORIES(${WXWINDOWS_LINK_DIRECTORIES})\r
33   ENDIF(WXWINDOWS_LINK_DIRECTORIES)\r
34   \r
35   IF(WXWINDOWS_LIBRARIES)\r
36     LINK_LIBRARIES(${WXWINDOWS_LIBRARIES})\r
37   ENDIF(WXWINDOWS_LIBRARIES)\r
38   \r
39   IF (CMAKE_WXWINDOWS_CXX_FLAGS)\r
40     SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_WXWINDOWS_CXX_FLAGS}")\r
41   ENDIF(CMAKE_WXWINDOWS_CXX_FLAGS)\r
42   \r
43   IF(WXWINDOWS_DEFINITIONS)\r
44     ADD_DEFINITIONS(${WXWINDOWS_DEFINITIONS})\r
45   ENDIF(WXWINDOWS_DEFINITIONS)\r
47 ELSE(WXWINDOWS_FOUND)\r
48   MESSAGE(SEND_ERROR "wxWindows not found by Use_wxWindows.cmake")\r
49 ENDIF(WXWINDOWS_FOUND)\r