[1505] | 1 | # Find CEGUI includes and library |
---|
| 2 | # |
---|
| 3 | # This module defines |
---|
| 4 | # CEGUI_INCLUDE_DIR |
---|
[2509] | 5 | # CEGUI_LIBRARY, the library to link against to use CEGUI. |
---|
[1505] | 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. |
---|
[1776] | 16 | # |
---|
| 17 | # Several changes and additions by Fabian 'x3n' Landau |
---|
[2509] | 18 | # Lots of simplifications by Adrian Friedli |
---|
[1776] | 19 | # > www.orxonox.net < |
---|
[1505] | 20 | |
---|
[2583] | 21 | INCLUDE(FindPackageHandleStandardArgs) |
---|
| 22 | INCLUDE(HandleLibraryTypes) |
---|
| 23 | |
---|
[2509] | 24 | FIND_PATH(CEGUI_INCLUDE_DIR CEGUI.h |
---|
| 25 | PATHS |
---|
| 26 | $ENV{CEGUIDIR} |
---|
| 27 | /usr/local |
---|
| 28 | /usr |
---|
| 29 | PATH_SUFFIXES include include/CEGUI |
---|
| 30 | ) |
---|
[2579] | 31 | FIND_LIBRARY(CEGUI_LIBRARY_OPTIMIZED |
---|
| 32 | NAMES CEGUIBase |
---|
| 33 | PATHS |
---|
| 34 | $ENV{CEGUIDIR} |
---|
| 35 | /usr/local |
---|
| 36 | /usr |
---|
[2594] | 37 | PATH_SUFFIXES lib bin |
---|
[2579] | 38 | ) |
---|
| 39 | FIND_LIBRARY(CEGUI_LIBRARY_DEBUG |
---|
[2583] | 40 | NAMES CEGUIBase${LIBRARY_DEBUG_POSTFIX} |
---|
[2579] | 41 | PATHS |
---|
| 42 | $ENV{CEGUIDIR} |
---|
| 43 | /usr/local |
---|
| 44 | /usr |
---|
[2594] | 45 | PATH_SUFFIXES lib bin |
---|
[2579] | 46 | ) |
---|
[1776] | 47 | |
---|
[2573] | 48 | # Look in CEGUIVersion.h for the version number |
---|
| 49 | INCLUDE(DetermineVersion) |
---|
[2583] | 50 | DETERMINE_VERSION(CEGUI ${CEGUI_INCLUDE_DIR}/CEGUIVersion.h) |
---|
[2574] | 51 | # STRLESS can be dangerous since it only compares strings. |
---|
[2577] | 52 | # Unfortunately VERSION_LESS is only provided since CMake v2.6.2 |
---|
[2574] | 53 | IF(${CEGUI_VERSION} STRLESS "0.5.0") |
---|
[2576] | 54 | MESSAGE(FATAL_ERROR "Minimum CEGUI version required is 0.5.0") |
---|
[2574] | 55 | ENDIF(${CEGUI_VERSION} STRLESS "0.5.0") |
---|
[2573] | 56 | |
---|
| 57 | |
---|
[1810] | 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 | # ) |
---|
[2576] | 64 | # IF (NOT CEGUI_SCRIPT_LIBDIR) |
---|
[1810] | 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) |
---|
[1776] | 74 | |
---|
[2579] | 75 | |
---|
[2509] | 76 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(CEGUI DEFAULT_MSG |
---|
[2579] | 77 | CEGUI_LIBRARY_OPTIMIZED |
---|
[2509] | 78 | CEGUI_INCLUDE_DIR |
---|
| 79 | #CEGUI_SCRIPT_LIBRARIES |
---|
| 80 | ) |
---|
[1776] | 81 | |
---|
[2579] | 82 | # Set optimized and debug libraries |
---|
| 83 | HandleLibraryTypes(CEGUI) |
---|
| 84 | |
---|
[2509] | 85 | MARK_AS_ADVANCED( |
---|
| 86 | CEGUI_LIBRARY |
---|
[2579] | 87 | CEGUI_LIBRARY_OPTIMIZED |
---|
| 88 | CEGUI_LIBRARY_DEBUG |
---|
[2509] | 89 | CEGUI_INCLUDE_DIR |
---|
| 90 | #CEGUI_SCRIPT_LIBRARIES |
---|
| 91 | ) |
---|