summaryrefslogtreecommitdiff
path: root/Modules/Use_wxWindows.cmake
blob: 8acd0a135fe7884c8f0b8cdc66cff4092ee22091 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# - 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.
# 


INCLUDE(FindwxWindows)

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)
    INCLUDE_DIRECTORIES(${WXWINDOWS_INCLUDE_DIR})
  ENDIF(WXWINDOWS_INCLUDE_DIR)
 
  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)