diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-05-30 21:13:09 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-05-30 21:16:08 +0300 |
commit | 5ab65c9e4f1fb42248b83e2f6ffb8980453914dc (patch) | |
tree | 99bd961563b93f9fdc7b2f0a9fe0cb536f1fc5ee /CMake/Modules | |
parent | f4f5aa5d603cc49615e3c7e58d7963e01310af84 (diff) | |
download | ManaVerse-5ab65c9e4f1fb42248b83e2f6ffb8980453914dc.tar.gz ManaVerse-5ab65c9e4f1fb42248b83e2f6ffb8980453914dc.tar.bz2 ManaVerse-5ab65c9e4f1fb42248b83e2f6ffb8980453914dc.tar.xz ManaVerse-5ab65c9e4f1fb42248b83e2f6ffb8980453914dc.zip |
Add guichan files to cmake and remove deps on guichan libs.
Diffstat (limited to 'CMake/Modules')
-rw-r--r-- | CMake/Modules/FindGuichan.cmake | 100 |
1 files changed, 0 insertions, 100 deletions
diff --git a/CMake/Modules/FindGuichan.cmake b/CMake/Modules/FindGuichan.cmake deleted file mode 100644 index dbc863e2f..000000000 --- a/CMake/Modules/FindGuichan.cmake +++ /dev/null @@ -1,100 +0,0 @@ -# - Try to find Guichan -# Once done this will define -# -# GUICHAN_FOUND - system has Guichan -# GUICHAN_INCLUDE_DIR - the Guichan include directory -# GUICHAN_LIBRARIES - the libraries needed to use Guichan -# -# Supported components: SDL OpenGL -# -# TODO: Clean up the components stuff and try to add all known -# components when none are specified. May not bail out for not found -# components then, set some var instead... - -# Be quiet if Guichan was already found -# We need an extra variable to have the check per component - -IF (Guichan_INCLUDE_DIR AND Guichan_LIBRARY) - SET(Guichan_QUIET TRUE) -ENDIF () - -FIND_PATH(Guichan_INCLUDE_DIR - NAMES guichan.hpp - PATHS /usr/include /usr/local/include - ) - -FIND_LIBRARY(Guichan_LIBRARY - NAMES guichan - PATHS /usr/lib /usr/local/lib - ) - -MARK_AS_ADVANCED(Guichan_INCLUDE_DIR Guichan_LIBRARY) - -IF (Guichan_INCLUDE_DIR AND Guichan_LIBRARY) - SET(GUICHAN_FOUND TRUE) - SET(GUICHAN_INCLUDE_DIR ${Guichan_INCLUDE_DIR}) - SET(GUICHAN_LIBRARIES ${Guichan_LIBRARY}) - - IF (NOT Guichan_FIND_QUIETLY AND NOT Guichan_QUIET) - MESSAGE(STATUS "Found Guichan: ${Guichan_LIBRARY}") - ENDIF () -ENDIF () - -# Bail out if Guichan is not found but required -IF (NOT GUICHAN_FOUND AND Guichan_FIND_REQUIRED) - MESSAGE(FATAL_ERROR "Could NOT find Guichan library ${GUICHAN_INCLUDE_DIR}") -ENDIF () - -# Check for guichan components -FOREACH (COMPONENT ${Guichan_FIND_COMPONENTS}) - SET(COMPONENT_FOUND FALSE) - - IF (COMPONENT STREQUAL "SDL") - SET(COMPONENT_FOUND TRUE) - SET(Guichan_HEADER "guichan/sdl.hpp") - SET(Guichan_LIBRARY "guichan_sdl") - ENDIF () - - IF (COMPONENT STREQUAL "OpenGL") - SET(COMPONENT_FOUND TRUE) - SET(Guichan_HEADER "guichan/opengl.hpp") - SET(Guichan_LIBRARY "guichan_opengl") - ENDIF () - - IF (NOT COMPONENT_FOUND) - MESSAGE(FATAL_ERROR "Invalid Guichan component: ${COMPONENT}") - ENDIF (NOT COMPONENT_FOUND) - - # Check if we already found this component - IF (Guichan_LIBRARY_${COMPONENT}) - SET(Guichan_QUIET TRUE) - ELSE () - SET(Guichan_QUIET FALSE) - ENDIF () - - FIND_LIBRARY(Guichan_LIBRARY_${COMPONENT} - NAMES ${Guichan_LIBRARY} - PATHS /usr/lib /usr/local/lib - ) - - MARK_AS_ADVANCED(Guichan_LIBRARY_${COMPONENT}) - - IF (NOT EXISTS ${Guichan_INCLUDE_DIR}/${Guichan_HEADER} OR - NOT Guichan_LIBRARY_${COMPONENT}) - SET(GUICHAN_FOUND FALSE) - MESSAGE(FATAL_ERROR "Could NOT find Guichan component ${COMPONENT}") - ENDIF () - - # Check guichan >= 0.8.0 by searching for the widgetlistener.hpp file. - SET(Guichan_HEADER "guichan/widgetlistener.hpp") - IF (NOT EXISTS ${Guichan_INCLUDE_DIR}/${Guichan_HEADER}) - SET(GUICHAN_FOUND FALSE) - MESSAGE(FATAL_ERROR "Guichan version is less than 0.8.0") - ENDIF() - - IF (NOT Guichan_FIND_QUIETLY AND NOT Guichan_QUIET) - MESSAGE(STATUS "Found Guichan ${COMPONENT}: ${Guichan_LIBRARY_${COMPONENT}}") - ENDIF () - - SET(GUICHAN_LIBRARIES ${GUICHAN_LIBRARIES} ${Guichan_LIBRARY_${COMPONENT}}) -ENDFOREACH() |