1 | # Find CEGUI includes and library |
---|
2 | # |
---|
3 | # This module defines |
---|
4 | # CEGUI_INCLUDE_DIR |
---|
5 | # CEGUI_LIBRARY, the library to link against to use CEGUI. |
---|
6 | # CEGUI_FOUND, If false, do not try to use CEGUI |
---|
7 | # |
---|
8 | # Created by Matt Williams to find OGRE libraries |
---|
9 | # Copyright © 2007, Matt Williams |
---|
10 | # |
---|
11 | # Modified by Nicolas Schlumberger to find CEGUI libraries |
---|
12 | # and make it run on the Tardis-Infrastucture of the ETH Zurich |
---|
13 | # Copyright 2007, Nicolas Schlumberger |
---|
14 | # |
---|
15 | # Redistribution and use is allowed according to the terms of the BSD license. |
---|
16 | # |
---|
17 | # Several changes and additions by Fabian 'x3n' Landau |
---|
18 | # Lots of simplifications by Adrian Friedli |
---|
19 | # > www.orxonox.net < |
---|
20 | |
---|
21 | FIND_PATH(CEGUI_INCLUDE_DIR CEGUI.h |
---|
22 | PATHS |
---|
23 | $ENV{CEGUIDIR} |
---|
24 | /usr/local |
---|
25 | /usr |
---|
26 | PATH_SUFFIXES include include/CEGUI |
---|
27 | ) |
---|
28 | FIND_LIBRARY(CEGUI_LIBRARY_OPTIMIZED |
---|
29 | NAMES CEGUIBase |
---|
30 | PATHS |
---|
31 | $ENV{CEGUIDIR} |
---|
32 | /usr/local |
---|
33 | /usr |
---|
34 | PATH_SUFFIXES lib |
---|
35 | ) |
---|
36 | FIND_LIBRARY(CEGUI_LIBRARY_DEBUG |
---|
37 | NAMES CEGUIBase_${LIBRARY_DEBUG_POSTFIX} |
---|
38 | PATHS |
---|
39 | $ENV{CEGUIDIR} |
---|
40 | /usr/local |
---|
41 | /usr |
---|
42 | PATH_SUFFIXES lib |
---|
43 | ) |
---|
44 | |
---|
45 | # Look in CEGUIVersion.h for the version number |
---|
46 | INCLUDE(DetermineVersion) |
---|
47 | DetermineVersion(CEGUI ${CEGUI_INCLUDE_DIR}/CEGUIVersion.h) |
---|
48 | # STRLESS can be dangerous since it only compares strings. |
---|
49 | # Unfortunately VERSION_LESS is only provided since CMake v2.6.2 |
---|
50 | IF(${CEGUI_VERSION} STRLESS "0.5.0") |
---|
51 | MESSAGE(FATAL_ERROR "Minimum CEGUI version required is 0.5.0") |
---|
52 | ENDIF(${CEGUI_VERSION} STRLESS "0.5.0") |
---|
53 | |
---|
54 | |
---|
55 | # IF (NOT CEGUI_SCRIPT_LIBDIR) |
---|
56 | # # Search Lua script module |
---|
57 | # SET(CEGUI_SCRIPT_LIBRARIES "CEGUILuaScriptModule") |
---|
58 | # FIND_LIBRARY(CEGUI_SCRIPT_LIBDIR NAMES ${CEGUI_SCRIPT_LIBRARIES} PATHS |
---|
59 | # ../libs/cegui-0.6.1/bin |
---|
60 | # ) |
---|
61 | # IF (NOT CEGUI_SCRIPT_LIBDIR) |
---|
62 | # SET(CEGUI_SCRIPT_LIBRARIES "CEGUILua") |
---|
63 | # FIND_LIBRARY(CEGUI_SCRIPT_LIBDIR NAMES ${CEGUI_SCRIPT_LIBRARIES} PATHS |
---|
64 | # ../libs/cegui-0.6.1/bin |
---|
65 | # ) |
---|
66 | # IF (NOT CEGUI_SCRIPT_LIBDIR) |
---|
67 | # SET(CEGUI_SCRIPT_LIBRARIES) |
---|
68 | # ENDIF (NOT CEGUI_SCRIPT_LIBDIR) |
---|
69 | # ENDIF (NOT CEGUI_SCRIPT_LIBDIR) |
---|
70 | # ENDIF (NOT CEGUI_SCRIPT_LIBDIR) |
---|
71 | |
---|
72 | |
---|
73 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(CEGUI DEFAULT_MSG |
---|
74 | CEGUI_LIBRARY_OPTIMIZED |
---|
75 | CEGUI_INCLUDE_DIR |
---|
76 | #CEGUI_SCRIPT_LIBRARIES |
---|
77 | ) |
---|
78 | |
---|
79 | # Set optimized and debug libraries |
---|
80 | HandleLibraryTypes(CEGUI) |
---|
81 | |
---|
82 | MARK_AS_ADVANCED( |
---|
83 | CEGUI_LIBRARY |
---|
84 | CEGUI_LIBRARY_OPTIMIZED |
---|
85 | CEGUI_LIBRARY_DEBUG |
---|
86 | CEGUI_INCLUDE_DIR |
---|
87 | #CEGUI_SCRIPT_LIBRARIES |
---|
88 | ) |
---|