Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/buildsystem2/cmake/FindCEGUI.cmake @ 2580

Last change on this file since 2580 was 2579, checked in by rgrieder, 16 years ago
  • Equipped find scripts with debug/optimized functions. If you have different debug prefixes on your platform simply change ${LIBRARY_DEBUG_POSTFIX} ("_d" default).
  • Clean up in ConfigMSVC.cmake and ConfigMinGW.cmake
  • Also had a good look at the MinGW libraries according to the libs_1889_mingw.zip (no warranty at all, hope I got them all)
  • INSTALL commands are currently limited to non Windows platforms (don't yet know why it doesn't work)
  • Property svn:eol-style set to native
File size: 2.5 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#  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
21FIND_PATH(CEGUI_INCLUDE_DIR CEGUI.h
22    PATHS
23    $ENV{CEGUIDIR}
24    /usr/local
25    /usr
26    PATH_SUFFIXES include include/CEGUI
27)
28FIND_LIBRARY(CEGUI_LIBRARY_OPTIMIZED
29    NAMES CEGUIBase
30    PATHS
31    $ENV{CEGUIDIR}
32    /usr/local
33    /usr
34    PATH_SUFFIXES lib
35)
36FIND_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
46INCLUDE(DetermineVersion)
47DetermineVersion(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
50IF(${CEGUI_VERSION} STRLESS "0.5.0")
51   MESSAGE(FATAL_ERROR "Minimum CEGUI version required is 0.5.0")
52ENDIF(${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
73FIND_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
80HandleLibraryTypes(CEGUI)
81
82MARK_AS_ADVANCED(
83    CEGUI_LIBRARY
84    CEGUI_LIBRARY_OPTIMIZED
85    CEGUI_LIBRARY_DEBUG
86    CEGUI_INCLUDE_DIR
87    #CEGUI_SCRIPT_LIBRARIES
88)
Note: See TracBrowser for help on using the repository browser.