Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/kicklib/cmake/tools/FindCEGUI.cmake @ 7957

Last change on this file since 7957 was 7941, checked in by rgrieder, 14 years ago

Kicked CEGUILua from our repository and adjusted the build system accordingly.
The Linux part is still missing though.

  • Property svn:eol-style set to native
File size: 2.8 KB
Line 
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
28INCLUDE(DetermineVersion)
29INCLUDE(FindPackageHandleAdvancedArgs)
30INCLUDE(HandleLibraryTypes)
31
32# Find CEGUI library
33FIND_PATH(CEGUI_INCLUDE_DIR CEGUI.h
34  PATHS $ENV{CEGUIDIR}
35  PATH_SUFFIXES include include/CEGUI CEGUI.framework/Headers
36)
37FIND_LIBRARY(CEGUI_LIBRARY_OPTIMIZED
38  NAMES CEGUIBase CEGUI
39  PATHS $ENV{CEGUIDIR}
40  PATH_SUFFIXES lib bin
41)
42FIND_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
51FIND_LIBRARY(CEGUILUA_LIBRARY_OPTIMIZED
52  NAMES CEGUILua CEGUILuaScriptModule
53  PATHS $ENV{CEGUIDIR}
54  PATH_SUFFIXES lib bin
55)
56FIND_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
63FIND_LIBRARY(CEGUI_TOLUA_LIBRARY_OPTIMIZED
64  NAMES CEGUItoluapp tolua++
65  PATHS $ENV{CEGUIDIR}
66  PATH_SUFFIXES lib bin
67)
68FIND_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
75DETERMINE_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
79FIND_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
87HANDLE_LIBRARY_TYPES(CEGUI)
88HANDLE_LIBRARY_TYPES(CEGUILUA)
89HANDLE_LIBRARY_TYPES(CEGUI_TOLUA)
90
91MARK_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)
Note: See TracBrowser for help on using the repository browser.