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 | # CEGUILUA_LIBRARY, the library to link against to use the CEGUI script module. |
---|
7 | # CEGUI_TOLUA_LIBRARY, the library to link against to use Tolua++. |
---|
8 | # CEGUI_FOUND, If false, do not try to use CEGUI |
---|
9 | # CEGUI_VERSION, the version as string "x.y.z" |
---|
10 | # |
---|
11 | # Input: |
---|
12 | # ENV{CEGUIDIR}, CEGUI path, optional |
---|
13 | # |
---|
14 | # Created by Matt Williams to find OGRE libraries |
---|
15 | # Copyright © 2007, Matt Williams |
---|
16 | # |
---|
17 | # Modified by Nicolas Schlumberger to find CEGUI libraries |
---|
18 | # and make it run on the Tardis-Infrastucture of the ETH Zurich |
---|
19 | # Copyright 2007, Nicolas Schlumberger |
---|
20 | # |
---|
21 | # Redistribution and use is allowed according to the terms of the BSD license. |
---|
22 | # |
---|
23 | # Several changes and additions by Fabian 'x3n' Landau |
---|
24 | # Lots of simplifications by Adrian Friedli and Reto Grieder |
---|
25 | # Version checking and CEGUILua finding by Reto Grieder |
---|
26 | # > www.orxonox.net < |
---|
27 | |
---|
28 | INCLUDE(DetermineVersion) |
---|
29 | INCLUDE(FindPackageHandleAdvancedArgs) |
---|
30 | INCLUDE(HandleLibraryTypes) |
---|
31 | |
---|
32 | # Find CEGUI library |
---|
33 | FIND_PATH(CEGUI_INCLUDE_DIR CEGUI.h |
---|
34 | PATHS $ENV{CEGUIDIR} |
---|
35 | PATH_SUFFIXES include include/CEGUI CEGUI.framework/Headers |
---|
36 | ) |
---|
37 | FIND_LIBRARY(CEGUI_LIBRARY_OPTIMIZED |
---|
38 | NAMES CEGUIBase CEGUI |
---|
39 | PATHS $ENV{CEGUIDIR} |
---|
40 | PATH_SUFFIXES lib bin |
---|
41 | ) |
---|
42 | FIND_LIBRARY(CEGUI_LIBRARY_DEBUG |
---|
43 | NAMES |
---|
44 | CEGUIBased CEGUIBase_d CEGUIBaseD CEGUIBase_D |
---|
45 | CEGUId CEGUI_d CEGUID CEGUI_D |
---|
46 | PATHS $ENV{CEGUIDIR} |
---|
47 | PATH_SUFFIXES lib bin |
---|
48 | ) |
---|
49 | |
---|
50 | # Find CEGUILua libraries |
---|
51 | FIND_LIBRARY(CEGUILUA_LIBRARY_OPTIMIZED |
---|
52 | NAMES CEGUILua CEGUILuaScriptModule |
---|
53 | PATHS $ENV{CEGUIDIR} |
---|
54 | PATH_SUFFIXES lib bin |
---|
55 | ) |
---|
56 | FIND_LIBRARY(CEGUILUA_LIBRARY_DEBUG |
---|
57 | NAMES CEGUILuad CEGUILua_d CEGUILuaScriptModuled CEGUILuaScriptModule_d |
---|
58 | PATHS $ENV{CEGUIDIR} |
---|
59 | PATH_SUFFIXES lib bin |
---|
60 | ) |
---|
61 | |
---|
62 | # Find CEGUI Tolua++ libraries |
---|
63 | FIND_LIBRARY(CEGUI_TOLUA_LIBRARY_OPTIMIZED |
---|
64 | NAMES CEGUItoluapp tolua++ |
---|
65 | PATHS $ENV{CEGUIDIR} |
---|
66 | PATH_SUFFIXES lib bin |
---|
67 | ) |
---|
68 | FIND_LIBRARY(CEGUI_TOLUA_LIBRARY_DEBUG |
---|
69 | NAMES CEGUItoluappd CEGUItoluapp_d tolua++d tolua++_d |
---|
70 | PATHS $ENV{CEGUIDIR} |
---|
71 | PATH_SUFFIXES lib bin |
---|
72 | ) |
---|
73 | |
---|
74 | # Inspect CEGUIVersion.h for the version number |
---|
75 | DETERMINE_VERSION(CEGUI ${CEGUI_INCLUDE_DIR}/CEGUIVersion.h) |
---|
76 | |
---|
77 | # Handle the REQUIRED argument and set CEGUI_FOUND |
---|
78 | # Also checks the version requirements if given |
---|
79 | FIND_PACKAGE_HANDLE_ADVANCED_ARGS(CEGUI DEFAULT_MSG "${CEGUI_VERSION}" |
---|
80 | CEGUI_INCLUDE_DIR |
---|
81 | CEGUI_LIBRARY_OPTIMIZED |
---|
82 | CEGUILUA_LIBRARY_OPTIMIZED |
---|
83 | CEGUI_TOLUA_LIBRARY_OPTIMIZED |
---|
84 | ) |
---|
85 | |
---|
86 | # Collect optimized and debug libraries |
---|
87 | HANDLE_LIBRARY_TYPES(CEGUI) |
---|
88 | HANDLE_LIBRARY_TYPES(CEGUILUA) |
---|
89 | HANDLE_LIBRARY_TYPES(CEGUI_TOLUA) |
---|
90 | |
---|
91 | MARK_AS_ADVANCED( |
---|
92 | CEGUI_INCLUDE_DIR |
---|
93 | CEGUI_LIBRARY_OPTIMIZED |
---|
94 | CEGUI_LIBRARY_DEBUG |
---|
95 | CEGUILUA_LIBRARY_OPTIMIZED |
---|
96 | CEGUILUA_LIBRARY_DEBUG |
---|
97 | CEGUI_TOLUA_LIBRARY_OPTIMIZED |
---|
98 | CEGUI_TOLUA_LIBRARY_DEBUG |
---|
99 | ) |
---|