Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 2594 was 2594, checked in by rgrieder, 16 years ago

MinGW is able to find all the necessary libraries. However compiling does not 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
21INCLUDE(FindPackageHandleStandardArgs)
22INCLUDE(HandleLibraryTypes)
23
24FIND_PATH(CEGUI_INCLUDE_DIR CEGUI.h
25    PATHS
26    $ENV{CEGUIDIR}
27    /usr/local
28    /usr
29    PATH_SUFFIXES include include/CEGUI
30)
31FIND_LIBRARY(CEGUI_LIBRARY_OPTIMIZED
32    NAMES CEGUIBase
33    PATHS
34    $ENV{CEGUIDIR}
35    /usr/local
36    /usr
37    PATH_SUFFIXES lib bin
38)
39FIND_LIBRARY(CEGUI_LIBRARY_DEBUG
40    NAMES CEGUIBase${LIBRARY_DEBUG_POSTFIX}
41    PATHS
42    $ENV{CEGUIDIR}
43    /usr/local
44    /usr
45    PATH_SUFFIXES lib bin
46)
47
48# Look in CEGUIVersion.h for the version number
49INCLUDE(DetermineVersion)
50DETERMINE_VERSION(CEGUI ${CEGUI_INCLUDE_DIR}/CEGUIVersion.h)
51# STRLESS can be dangerous since it only compares strings.
52# Unfortunately VERSION_LESS is only provided since CMake v2.6.2
53IF(${CEGUI_VERSION} STRLESS "0.5.0")
54   MESSAGE(FATAL_ERROR "Minimum CEGUI version required is 0.5.0")
55ENDIF(${CEGUI_VERSION} STRLESS "0.5.0")
56
57
58#    IF (NOT CEGUI_SCRIPT_LIBDIR)
59#        # Search Lua script module
60#        SET(CEGUI_SCRIPT_LIBRARIES "CEGUILuaScriptModule")
61#        FIND_LIBRARY(CEGUI_SCRIPT_LIBDIR NAMES ${CEGUI_SCRIPT_LIBRARIES} PATHS
62#            ../libs/cegui-0.6.1/bin
63#        )
64#    IF (NOT CEGUI_SCRIPT_LIBDIR)
65#            SET(CEGUI_SCRIPT_LIBRARIES "CEGUILua")
66#            FIND_LIBRARY(CEGUI_SCRIPT_LIBDIR NAMES ${CEGUI_SCRIPT_LIBRARIES} PATHS
67#                ../libs/cegui-0.6.1/bin
68#            )
69#            IF (NOT CEGUI_SCRIPT_LIBDIR)
70#                SET(CEGUI_SCRIPT_LIBRARIES)
71#            ENDIF (NOT CEGUI_SCRIPT_LIBDIR)
72#        ENDIF (NOT CEGUI_SCRIPT_LIBDIR)
73#    ENDIF (NOT CEGUI_SCRIPT_LIBDIR)
74
75
76FIND_PACKAGE_HANDLE_STANDARD_ARGS(CEGUI DEFAULT_MSG
77    CEGUI_LIBRARY_OPTIMIZED
78    CEGUI_INCLUDE_DIR
79    #CEGUI_SCRIPT_LIBRARIES
80)
81
82# Set optimized and debug libraries
83HandleLibraryTypes(CEGUI)
84
85MARK_AS_ADVANCED(
86    CEGUI_LIBRARY
87    CEGUI_LIBRARY_OPTIMIZED
88    CEGUI_LIBRARY_DEBUG
89    CEGUI_INCLUDE_DIR
90    #CEGUI_SCRIPT_LIBRARIES
91)
Note: See TracBrowser for help on using the repository browser.