Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/buildsystem/cmake/FindCEGUI.cmake @ 2327

Last change on this file since 2327 was 2318, checked in by adrfried, 16 years ago

cmake for mingw improved

  • 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
21# TODO: Determine CEGUI version
22
23FIND_PATH(CEGUI_INCLUDE_DIR CEGUI.h
24    PATHS
25    $ENV{CEGUIDIR}
26    /usr/local
27    /usr
28    PATH_SUFFIXES include include/CEGUI
29)
30
31IF(WIN32)
32    FIND_LIBRARY(CEGUI_LIBRARY_
33        NAMES CEGUIBase
34        PATHS
35        $ENV{CEGUIDIR}
36        PATH_SUFFIXES lib
37    )
38    FIND_LIBRARY(CEGUI_LIBRARY_d
39        NAMES CEGUIBase_d
40        PATHS
41        $ENV{CEGUIDIR}
42        PATH_SUFFIXES lib
43    )
44    IF(CEGUI_LIBRARY_)
45        IF(CEGUI_LIBRARY_d)
46            SET(CEGUI_LIBRARY optimized ${CEGUI_LIBRARY_} debug ${CEGUI_LIBRARY_d})
47        ELSE(CEGUI_LIBRARY_d)
48            SET(CEGUI_LIBRARY ${CEGUI_LIBRARY_})
49        ENDIF(CEGUI_LIBRARY_d)
50    ENDIF(CEGUI_LIBRARY_)
51ELSE(WIN32)
52    FIND_LIBRARY(CEGUI_LIBRARY
53        NAMES CEGUIBase
54        PATHS
55        $ENV{CEGUIDIR}
56        /usr/local
57        /usr
58        PATH_SUFFIXES lib
59    )
60ENDIF(WIN32)
61
62#    IF (NOT CEGUI_SCRIPT_LIBDIR)
63#        # Search Lua script module
64#        SET(CEGUI_SCRIPT_LIBRARIES "CEGUILuaScriptModule")
65#        FIND_LIBRARY(CEGUI_SCRIPT_LIBDIR NAMES ${CEGUI_SCRIPT_LIBRARIES} PATHS
66#            ../libs/cegui-0.6.1/bin
67#        )
68#       IF (NOT CEGUI_SCRIPT_LIBDIR)
69#            SET(CEGUI_SCRIPT_LIBRARIES "CEGUILua")
70#            FIND_LIBRARY(CEGUI_SCRIPT_LIBDIR NAMES ${CEGUI_SCRIPT_LIBRARIES} PATHS
71#                ../libs/cegui-0.6.1/bin
72#            )
73#            IF (NOT CEGUI_SCRIPT_LIBDIR)
74#                SET(CEGUI_SCRIPT_LIBRARIES)
75#            ENDIF (NOT CEGUI_SCRIPT_LIBDIR)
76#        ENDIF (NOT CEGUI_SCRIPT_LIBDIR)
77#    ENDIF (NOT CEGUI_SCRIPT_LIBDIR)
78
79INCLUDE(FindPackageHandleStandardArgs)
80FIND_PACKAGE_HANDLE_STANDARD_ARGS(CEGUI DEFAULT_MSG
81    CEGUI_LIBRARY
82    CEGUI_INCLUDE_DIR
83    #CEGUI_SCRIPT_LIBRARIES
84)
85
86MARK_AS_ADVANCED(
87    CEGUI_LIBRARY
88    CEGUI_LIBRARY_
89    CEGUI_LIBRARY_d
90    CEGUI_INCLUDE_DIR
91    #CEGUI_SCRIPT_LIBRARIES
92)
Note: See TracBrowser for help on using the repository browser.